﻿(self.webpackChunkvk=self.webpackChunkvk||[]).push([[59302],{105539:(e,t,a)=>{"use strict";function i(){return{icon:'<svg fill="none" height="12" viewBox="0 0 12 12" width="12" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M9.03 2.97c.3.3.3.77 0 1.06L7.06 6l1.97 1.97a.75.75 0 01-1.06 1.06L6 7.06 4.03 9.03a.75.75 0 01-1.06-1.06L4.94 6 2.97 4.03a.75.75 0 011.06-1.06L6 4.94l1.97-1.97c.3-.3.77-.3 1.06 0z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"cancel_outline_12"}}a.d(t,{getIcon12CancelOutline:()=>i})},562487:(e,t,a)=>{"use strict";function i(){return{icon:'<svg fill="none" height="8" viewBox="0 0 12 8" width="12" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2.16 2.3a.75.75 0 011.05-.14L6 4.3l2.8-2.15a.75.75 0 11.9 1.19l-3.24 2.5c-.27.2-.65.2-.92 0L2.3 3.35a.75.75 0 01-.13-1.05z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"dropdown_12"}}a.d(t,{getIcon12Dropdown:()=>i})},333200:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.74 3.76c.35.34.35.9 0 1.23l-7.31 7.25a.88.88 0 01-1.25 0L2.26 9.36a.87.87 0 010-1.23.88.88 0 011.24 0l2.3 2.26 6.7-6.63a.88.88 0 011.24 0z" fill="currentColor"/></svg>',name:"done_16"}}a.d(t,{getIcon16Done:()=>i})},401143:(e,t,a)=>{"use strict";function i(){return{icon:'<svg fill="none" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M5.4 9c.55 0 .76.06.96.17.2.1.36.27.47.47.11.2.17.4.17.96v1.8c0 .55-.06.76-.17.96s-.27.36-.47.47c-.2.11-.4.17-.96.17H3.6c-.55 0-.76-.06-.96-.17-.2-.1-.36-.27-.47-.47S2 12.96 2 12.4v-1.8c0-.55.06-.76.17-.96.1-.2.27-.36.47-.47.2-.11.4-.17.96-.17zm7 0c.55 0 .76.06.96.17s.36.27.47.47c.11.2.17.4.17.96v1.8c0 .55-.06.76-.17.96-.1.2-.27.36-.47.47-.2.11-.4.17-.96.17h-1.8c-.55 0-.76-.06-.96-.17-.2-.1-.36-.27-.47-.47S9 12.96 9 12.4v-1.8c0-.55.06-.76.17-.96.1-.2.27-.36.47-.47s.4-.17.96-.17zm-.57-7.47c.23.07.4.17.8.57l1.27 1.27c.4.4.5.57.57.8.06.22.06.44 0 .66s-.17.4-.57.8L12.63 6.9c-.4.4-.57.5-.8.57-.22.06-.44.06-.66 0-.23-.07-.4-.17-.8-.57L9.1 5.63c-.4-.4-.5-.57-.57-.8a1.14 1.14 0 010-.66c.07-.23.17-.4.57-.8l1.27-1.27c.4-.4.57-.5.8-.57s.44-.06.66 0zM5.4 2c.55 0 .76.06.96.17.2.1.36.27.47.47.11.2.17.4.17.96v1.8c0 .55-.06.76-.17.96-.1.2-.27.36-.47.47-.2.11-.4.17-.96.17H3.6c-.55 0-.76-.06-.96-.17-.2-.1-.36-.27-.47-.47-.11-.2-.17-.4-.17-.96V3.6c0-.55.06-.76.17-.96.1-.2.27-.36.47-.47.2-.11.4-.17.96-.17z" fill="currentColor"/></svg>',name:"services_16"}}a.d(t,{getIcon16Services:()=>i})},677990:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.8 3.96a.87.87 0 00-.66.12l-.01.01-3.63 2.3v6.21l3.64 2.3a.88.88 0 001.1-.12.94.94 0 00.27-.66V4.88a.95.95 0 00-.14-.51.9.9 0 00-.56-.4zM11 12.54V6.46H5.48c-.82 0-1.56.34-2.1.89a3.06 3.06 0 00-.86 2.15c0 .84.33 1.6.87 2.15a2.92 2.92 0 002.09.88H11zm.96-7.57l3.36-2.13a2.37 2.37 0 011.82-.33 2.4 2.4 0 011.5 1.07c.24.4.37.85.37 1.3v9.25c0 .66-.26 1.27-.7 1.71a2.38 2.38 0 01-2.99.34l-3.37-2.14h-2.3l.19 1.04a2.43 2.43 0 01-.42 1.85 2.52 2.52 0 01-3.47.6 2.46 2.46 0 01-1.03-1.59l-.36-2a4.44 4.44 0 01-2.24-1.23 4.56 4.56 0 01-1.3-3.2c0-1.25.5-2.38 1.3-3.2a4.42 4.42 0 013.16-1.34h6.48zM6.1 14.03l.3 1.64a.96.96 0 00.4.62 1.02 1.02 0 001.4-.24.93.93 0 00.16-.71l-.23-1.31H6.1z" fill="currentColor"/></svg>',name:"advertising_outline_20"}}a.d(t,{getIcon20AdvertisingOutline:()=>i})},116206:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g id="article_box_outline_20__Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="article_box_outline_20__article_box_outline_20" fill-rule="nonzero"><path id="article_box_outline_20__Shape" opacity=".53" d="M0 0h20v20H0z"/><path d="M6.92 2h6.16c1.44 0 2.14.13 2.86.52a3.7 3.7 0 011.54 1.54c.39.72.52 1.42.52 2.86v6.16c0 1.44-.13 2.14-.52 2.86a3.7 3.7 0 01-1.54 1.54c-.72.39-1.42.52-2.86.52H6.92c-1.44 0-2.14-.13-2.86-.52a3.7 3.7 0 01-1.54-1.54c-.39-.72-.52-1.42-.52-2.86V6.92c0-1.44.13-2.14.52-2.86a3.7 3.7 0 011.54-1.54C4.78 2.13 5.48 2 6.92 2zm0 1.5c-1.21 0-1.68.09-2.15.35-.4.2-.71.52-.92.92-.26.47-.35.94-.35 2.15v6.16c0 1.21.09 1.68.35 2.15.2.4.52.71.92.92.47.26.94.35 2.15.35h6.16c1.21 0 1.68-.09 2.15-.35.4-.2.71-.52.92-.92.26-.47.35-.94.35-2.15V6.92c0-1.21-.09-1.68-.35-2.15a2.2 2.2 0 00-.92-.92c-.47-.26-.94-.35-2.15-.35H6.92zM6.75 6h6.5a.75.75 0 110 1.5h-6.5a.75.75 0 010-1.5zm0 3.25h6.5a.75.75 0 110 1.5h-6.5a.75.75 0 110-1.5zm0 3.25h4.5a.75.75 0 110 1.5h-4.5a.75.75 0 110-1.5z" id="article_box_outline_20__Icon-Color" fill="currentColor"/></g></g></svg>',name:"article_box_outline_20"}}a.d(t,{getIcon20ArticleBoxOutline:()=>i})},508723:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.25 14.5c.42 0 .75.34.75.75v.1a.75.75 0 01-.75.65H4.75a.75.75 0 110-1.5h12.5zm0-5a.75.75 0 110 1.5h-8.5a.75.75 0 01-.75-.75v-.1a.75.75 0 01.75-.65h8.5zm-9-6.5c.4 0 .75.34.75.75v.1a.75.75 0 01-.75.65h-2.5v5.75a.75.75 0 01-1.5 0V4.5h-2.5a.76.76 0 01-.74-.65L1 3.75c0-.42.34-.75.75-.75h6.5zm9 1.5a.75.75 0 010 1.5h-5.5a.75.75 0 01-.75-.75v-.1a.75.75 0 01.75-.65h5.5z" fill="currentColor"/></svg>',name:"articles_outline_20"}}a.d(t,{getIcon20ArticlesOutline:()=>i})},185931:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.67 12.5c-1 0-1.77.76-1.82 1.72a3.54 3.54 0 01-1.28 2.65c.53.15 1.27.21 2.22-.07 1.9-.57 2.7-1.73 2.7-2.62 0-.9-.78-1.69-1.82-1.69zm-3.31 1.65a3.3 3.3 0 013.3-3.16c1.8 0 3.32 1.4 3.32 3.2 0 1.8-1.5 3.37-3.76 4.05-2.16.64-3.64-.03-4.35-.55a.92.92 0 01-.3-.36.84.84 0 01-.03-.6c.15-.47.64-.67.99-.95.38-.3.79-.76.83-1.63zM15.7 2a1.6 1.6 0 012.26-.07 1.69 1.69 0 01.17 2.29l-6.08 7.5a.75.75 0 01-1.05.1.75.75 0 01-.1-1.05l6.07-7.5a.18.18 0 00-.02-.23c-.07-.07-.13-.03-.2.04l-7 6.7a.75.75 0 01-1.06-.02.75.75 0 01.02-1.06l7-6.7z" fill="currentColor"/></svg>',name:"brush_outline_20"}}a.d(t,{getIcon20BrushOutline:()=>i})},173234:(e,t,a)=>{"use strict";function i(){return{icon:'<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M5.5 5.5c.57 0 1-.2 1.34-.52.24-.24.43-.54.55-.74l.06-.1c.15-.23.26-.37.39-.47.11-.08.3-.17.66-.17h3c.36 0 .55.09.66.17.13.1.24.24.4.48l.05.09c.12.2.3.5.55.74.33.32.77.52 1.34.52.73 0 .99 0 1.19.04.9.18 1.59.88 1.77 1.77.04.2.04.46.04 1.19v3.45c0 .85 0 1.45-.04 1.9-.04.46-.1.72-.2.92-.22.42-.57.77-.99.98-.2.1-.46.17-.91.21-.46.04-1.06.04-1.91.04h-6.9c-.85 0-1.45 0-1.91-.04a2.4 2.4 0 01-.91-.2 2.25 2.25 0 01-.99-.99 2.4 2.4 0 01-.2-.91c-.04-.46-.04-1.06-.04-1.91V8.5c0-.73 0-.99.04-1.19.18-.9.88-1.59 1.77-1.77.2-.04.46-.04 1.19-.04zm3-3.5c-.64 0-1.14.16-1.54.46-.39.27-.62.63-.78.9l-.08.11c-.13.22-.2.34-.3.43-.06.05-.12.1-.3.1h-.09c-.61 0-1.03 0-1.4.07a3.75 3.75 0 00-2.94 2.95C1 7.38 1 7.8 1 8.42v3.56c0 .81 0 1.47.04 2 .05.55.14 1.03.37 1.47.36.7.93 1.28 1.64 1.64.44.23.92.32 1.47.37.53.04 1.18.04 2 .04H13.48c.81 0 1.47 0 2-.04a3.84 3.84 0 001.47-.37c.7-.36 1.28-.93 1.64-1.64.23-.44.32-.92.37-1.47.04-.53.04-1.19.04-2V8.41c0-.61 0-1.03-.07-1.4a3.75 3.75 0 00-2.95-2.94 7.5 7.5 0 00-1.4-.07h-.08c-.18 0-.24-.05-.3-.1-.1-.1-.17-.2-.3-.43l-.08-.12c-.16-.26-.4-.62-.78-.9-.4-.29-.9-.45-1.54-.45zm3.75 8.25a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm1.5 0a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"camera_outline_20"}}a.d(t,{getIcon20CameraOutline:()=>i})},270908:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.08 3.5c-1.66 0-2.02.17-2.36.35-.38.2-.67.49-.87.87-.18.34-.35.7-.35 2.36v5.84c0 1.66.17 2.02.35 2.36.2.38.49.67.87.87.34.18.7.35 2.36.35h5.84c1.66 0 2.02-.17 2.36-.35.38-.2.67-.49.87-.87.18-.34.35-.7.35-2.36V7.08c0-1.66-.17-2.02-.35-2.36a2.07 2.07 0 00-.87-.87c-.34-.18-.7-.35-2.36-.35H7.08zm-3.07-.97C4.66 2.18 5.31 2 7.08 2h5.84c1.77 0 2.42.18 3.07.53.64.34 1.14.84 1.48 1.48.35.65.53 1.3.53 3.07v5.84c0 1.77-.18 2.42-.53 3.07A3.57 3.57 0 0116 17.47c-.65.35-1.3.53-3.07.53H7.08c-1.77 0-2.42-.18-3.07-.53A3.57 3.57 0 012.53 16c-.35-.65-.53-1.3-.53-3.07V7.08c0-1.77.18-2.42.53-3.07A3.57 3.57 0 014 2.53z" fill="currentColor"/><path d="M6 7.5c0-.47 0-.7.08-.88a1 1 0 01.54-.54C6.8 6 7.03 6 7.5 6s.7 0 .88.08a1 1 0 01.54.54c.08.18.08.41.08.88v3c0 .47 0 .7-.08.88a1 1 0 01-.54.54c-.18.08-.41.08-.88.08s-.7 0-.88-.08a1 1 0 01-.54-.54C6 11.2 6 10.97 6 10.5v-3zm5 0c0-.47 0-.7.08-.88a1 1 0 01.54-.54c.18-.08.41-.08.88-.08s.7 0 .88.08a1 1 0 01.54.54c.08.18.08.41.08.88v5c0 .47 0 .7-.08.88a1 1 0 01-.54.54c-.18.08-.41.08-.88.08s-.7 0-.88-.08a1 1 0 01-.54-.54c-.08-.18-.08-.41-.08-.88v-5z" fill="currentColor"/></svg>',name:"columns_square_20"}}a.d(t,{getIcon20ColumnsSquare:()=>i})},650302:(e,t,a)=>{"use strict";function i(){return{icon:'<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.2 6.78a2 2 0 01.24.58c.06.23.06.48.06.97v2.97c0 2.52 0 3.78-.49 4.74a4.5 4.5 0 01-1.97 1.97c-.96.49-2.22.49-4.74.49h-.6c-2.52 0-3.78 0-4.74-.49a4.5 4.5 0 01-1.97-1.97c-.49-.96-.49-2.22-.49-4.74V8.7c0-2.52 0-3.78.49-4.74a4.5 4.5 0 011.97-1.97c.96-.49 2.22-.49 4.74-.49h.97c.5 0 .74 0 .97.06.2.04.4.13.58.23.2.13.37.3.72.65l3.62 3.62c.35.35.52.52.65.72zM10.3 17h-.6c-1.28 0-2.16 0-2.83-.06-.66-.05-1-.15-1.23-.27a3 3 0 01-1.31-1.3 3.24 3.24 0 01-.27-1.24C4 13.46 4 12.58 4 11.3V8.7c0-1.28 0-2.16.06-2.83.05-.66.15-1 .27-1.23a3 3 0 011.3-1.31c.24-.12.58-.22 1.24-.27C7.54 3 8.42 3 9.7 3h.3v1.28c0 .67 0 1.23.04 1.67.03.47.12.88.31 1.28.32.6.81 1.1 1.42 1.42.4.2.81.28 1.28.31.44.04 1 .04 1.67.04H16v2.3c0 1.28 0 2.16-.06 2.83-.05.66-.15 1-.27 1.23a3 3 0 01-1.3 1.31c-.24.12-.58.22-1.24.27-.67.06-1.55.06-2.83.06zm5.57-9.5h-1.12c-.71 0-1.2 0-1.58-.03a1.88 1.88 0 01-.71-.16c-.33-.17-.6-.44-.77-.77a1.88 1.88 0 01-.16-.7 21.6 21.6 0 01-.03-1.59V3.13l.01.01.37.36 3.62 3.62.36.37.01.01z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"document_outline_20"}}a.d(t,{getIcon20DocumentOutline:()=>i})},290686:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g id="gift_outline_20__Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="gift_outline_20__Icons-20/gift_outline_20"><g id="gift_outline_20__gift_outline_20"><path d="M0 0h20v20H0z"/><path d="M14.85 2.31c1.02 1.03 1.23 2.88-.26 4.19h.91a3 3 0 013 3v.5c0 .82-.1 1.15-.27 1.48a1.88 1.88 0 01-1.23.94v1.61c0 1.56-.16 2.13-.47 2.7-.3.57-.75 1.02-1.32 1.32l-.2.1c-.48.23-1.04.35-2.23.37h-5.3c-1.55 0-2.12-.16-2.69-.47a3.18 3.18 0 01-1.32-1.32l-.1-.2A5.12 5.12 0 013 14.3V12.4a1.88 1.88 0 01-1.23-.93c-.16-.3-.25-.6-.27-1.3V9.5a3 3 0 013-3h.91c-1.49-1.31-1.28-3.16-.26-4.19C6.37 1.1 8.74 1.04 10 3.57c1.26-2.53 3.63-2.47 4.85-1.26zM9.25 12.5H4.5v1.76l.01.4c.02.6.08.92.2 1.2l.08.16c.17.31.4.54.7.71l.17.08c.33.14.72.2 1.6.2h1.99V12.5zm6.25 0h-4.75v4.52h2l.4-.01c.6-.02.91-.08 1.19-.2l.16-.08c.31-.17.54-.4.71-.7.19-.36.27-.7.29-1.56V12.5zM9.16 8H4.5C3.67 8 3 8.67 3 9.5v.87c.02.23.04.31.09.4.03.06.08.1.14.14.11.06.22.08.63.09h5.39V8h-.09zm6.34 0h-4.76v3h5.4c.4 0 .52-.03.63-.09.06-.03.1-.08.14-.14.06-.12.09-.25.09-.78V9.5c0-.83-.67-1.5-1.5-1.5zM9.22 6.16c-.43-3.1-1.96-3.83-3-2.79C5.16 4.42 5.9 5.95 9 6.38l.26.04zm1.56 0l-.03.19.01.06.24-.03c3.1-.43 3.83-1.96 2.79-3-1.05-1.05-2.58-.32-3.01 2.78z" id="gift_outline_20__Icon-Color" fill="currentColor" fill-rule="nonzero"/></g></g></g></svg>',name:"gift_outline_20"}}a.d(t,{getIcon20GiftOutline:()=>i})},651848:(e,t,a)=>{"use strict";function i(){return{icon:'<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M7.25 5.75a2.75 2.75 0 015.5 0V6h-5.5zM5.75 6v-.25a4.25 4.25 0 018.5 0V6c1.01.02 1.62.08 2.11.33a3 3 0 011.31 1.3c.33.65.33 1.49.33 3.17v.5c0 2.52 0 3.78-.49 4.74a4.5 4.5 0 01-1.97 1.97c-.96.49-2.22.49-4.74.49H9.2c-2.52 0-3.78 0-4.74-.49a4.5 4.5 0 01-1.97-1.97C2 15.08 2 13.82 2 11.3v-.5c0-1.68 0-2.52.33-3.16a3 3 0 011.3-1.31c.5-.25 1.1-.31 2.12-.33zm-.8 1.54c.43-.04.99-.04 1.85-.04h6.4c.86 0 1.42 0 1.85.04.4.03.56.09.63.12.28.15.51.38.66.66.03.07.1.22.12.63.04.43.04.99.04 1.85v.5c0 1.28 0 2.16-.06 2.83-.05.66-.15 1-.27 1.23a3 3 0 01-1.3 1.31c-.24.12-.58.22-1.24.27-.67.06-1.55.06-2.83.06H9.2c-1.28 0-2.16 0-2.83-.06-.66-.05-1-.15-1.23-.27a3 3 0 01-1.31-1.3 3.24 3.24 0 01-.27-1.24c-.06-.67-.06-1.55-.06-2.83v-.5c0-.86 0-1.42.04-1.85.03-.4.09-.56.12-.63.15-.28.38-.51.66-.66.07-.03.22-.1.63-.12zm.8 2.33a.87.87 0 111.75 0 .87.87 0 01-1.75 0zM13.38 9a.88.88 0 100 1.75.88.88 0 000-1.75z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"market_outline_20"}}a.d(t,{getIcon20MarketOutline:()=>i})},628661:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.62 2.5h6.76c.99 0 1.65 0 2.21.16a4.05 4.05 0 012.75 2.75c.16.56.16 1.22.16 2.2v3.18a.75.75 0 01-1.5 0V8.5H3v1.47c0 .94 0 1.6.04 2.1.04.51.12.8.24 1.04.24.48.63.87 1.11 1.11.23.12.53.2 1.03.24.52.04 1.17.04 2.11.04H17a.75.75 0 010 1.5H7.5c-.9 0-1.62 0-2.2-.05a4.2 4.2 0 01-1.59-.4 4.05 4.05 0 01-1.77-1.76c-.24-.48-.34-1-.4-1.6-.04-.57-.04-1.3-.04-2.19V7.62c0-.99 0-1.65.16-2.21a4.05 4.05 0 012.75-2.75c.56-.16 1.22-.16 2.2-.16zM3 7h14c-.01-.63-.03-.93-.1-1.17a2.55 2.55 0 00-1.73-1.73c-.33-.1-.75-.1-1.92-.1h-6.5c-1.17 0-1.6 0-1.92.1A2.55 2.55 0 003.1 5.83C3.03 6.07 3 6.37 3 7z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M14.72 12.22a.75.75 0 011.06 0l2.5 2.5a.75.75 0 010 1.06l-2.5 2.5a.75.75 0 11-1.06-1.06l1.97-1.97-1.97-1.97a.75.75 0 010-1.06z" fill="currentColor"/></svg>',name:"money_transfer_outline_20"}}a.d(t,{getIcon20MoneyTransferOutline:()=>i})},478441:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g id="music_outline_20__Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="music_outline_20__Icons-20/music_outline_20"><g id="music_outline_20__music_outline_20"><path d="M0 0h20v20H0z"/><path d="M14.73 2.05a2.28 2.28 0 012.75 2.23v7.99c0 3.57-3.5 5.4-5.39 3.51-1.9-1.9-.06-5.38 3.52-5.38h.37V6.76L8 8.43v5.82c0 3.5-3.35 5.34-5.27 3.62l-.11-.1c-1.9-1.9-.06-5.4 3.51-5.4h.37V6.24c0-.64.05-1 .19-1.36l.05-.13c.17-.38.43-.7.76-.93.36-.26.7-.4 1.41-.54zM6.5 13.88h-.37c-2.32 0-3.34 1.94-2.45 2.82.88.89 2.82-.13 2.82-2.45v-.37zm9.48-1.98h-.37c-2.32 0-3.34 1.94-2.46 2.82.89.89 2.83-.13 2.83-2.45v-.37zm-.02-7.78a.78.78 0 00-.92-.6L9.06 4.77c-.4.09-.54.15-.68.25a.8.8 0 00-.27.33c-.08.18-.1.35-.1.88v.67l7.97-1.67v-.95-.08z" id="music_outline_20__Icon-Color" fill="currentColor" fill-rule="nonzero"/></g></g></g></svg>',name:"music_outline_20"}}a.d(t,{getIcon20MusicOutline:()=>i})},557747:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.53 9.28a.75.75 0 00-1.06-1.06L9 11.69l-1.47-1.47a.75.75 0 10-1.06 1.06l2 2a.75.75 0 001.06 0l4-4z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6.25 1a.75.75 0 01.75.75v.27C7.51 2 8.11 2 8.82 2h.43v-.25a.75.75 0 011.5 0V2h.43c.7 0 1.3 0 1.82.02v-.27a.75.75 0 011.5 0v.46c.24.06.46.14.68.25a4.25 4.25 0 011.86 1.86c.25.5.36 1.04.41 1.67.05.61.05 1.37.05 2.33v3.86c0 .96 0 1.72-.05 2.33a4.39 4.39 0 01-.41 1.67 4.25 4.25 0 01-1.86 1.86c-.5.25-1.04.36-1.67.41-.61.05-1.38.05-2.33.05H8.82c-.96 0-1.72 0-2.33-.05a4.39 4.39 0 01-1.67-.41 4.25 4.25 0 01-1.86-1.86 4.39 4.39 0 01-.41-1.67c-.05-.61-.05-1.38-.05-2.33V8.32c0-.96 0-1.72.05-2.33.05-.63.16-1.17.41-1.67a4.25 4.25 0 011.86-1.86c.22-.1.44-.19.68-.25v-.46A.75.75 0 016.25 1zm4.9 2.5c.77 0 1.37 0 1.85.02v.23a.75.75 0 001.5.05A2.75 2.75 0 0115.7 5c.13.25.21.57.26 1.11.04.55.04 1.25.04 2.24v3.8c0 1 0 1.7-.04 2.24a2.9 2.9 0 01-.26 1.1 2.75 2.75 0 01-1.2 1.21c-.25.13-.57.21-1.11.26-.55.04-1.25.04-2.24.04h-2.3c-1 0-1.7 0-2.24-.04a2.9 2.9 0 01-1.1-.26 2.75 2.75 0 01-1.21-1.2 2.94 2.94 0 01-.26-1.11C4 13.84 4 13.14 4 12.15v-3.8c0-1 0-1.7.04-2.24.05-.53.13-.86.26-1.1A2.75 2.75 0 015.5 3.8.75.75 0 007 3.75v-.23a45.88 45.88 0 011.85-.02h.4v.25a.75.75 0 001.5 0V3.5h.4z" fill="currentColor"/></svg>',name:"notebook_check_outline_20"}}a.d(t,{getIcon20NotebookCheckOutline:()=>i})},95484:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g id="place_outline_20__Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="place_outline_20__Icons-20/place_outline_20"><g id="place_outline_20__place_outline_20"><path opacity=".4" d="M0 0h20v20H0z"/><path d="M10 1c4.15 0 7.5 3.43 7.5 7.5 0 2.85-1.84 6.17-5.43 10.1a2.8 2.8 0 01-4.14 0C4.34 14.66 2.5 11.34 2.5 8.5 2.5 4.43 5.85 1 10 1zm0 1.5c-3.38 0-6 2.83-6 6 0 2.38 1.68 5.41 5.04 9.08a1.3 1.3 0 001.92 0C14.32 13.91 16 10.88 16 8.5c0-3.17-2.62-6-6-6zM10 5a3.5 3.5 0 110 7 3.5 3.5 0 010-7zm0 1.5a2 2 0 100 4 2 2 0 000-4z" id="place_outline_20__Icon-Color" fill="currentColor" fill-rule="nonzero"/></g></g></g></svg>',name:"place_outline_20"}}a.d(t,{getIcon20PlaceOutline:()=>i})},768186:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g id="podcast_outline_20__Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="podcast_outline_20__Icons-20/podcast_outline_20"><g id="podcast_outline_20__podcast_outline_20"><path id="podcast_outline_20__Shape" opacity=".4" d="M0 0h20v20H0z"/><path d="M10 5a4 4 0 014 4v3a4 4 0 01-3.25 3.93v1.32a.75.75 0 11-1.5 0v-1.32A4 4 0 016 12V9a4 4 0 014-4zm0 1.5A2.5 2.5 0 007.5 9v3a2.5 2.5 0 004.5 1.5H10.45a.75.75 0 110-1.5h2.05v-1.5h-2.05a.75.75 0 110-1.5h2.05A2.5 2.5 0 0010 6.5zM10 2a7 7 0 016.94 6.07A1.5 1.5 0 0118 9.5v3a1.5 1.5 0 01-3 0v-3c0-.43.18-.81.47-1.09a5.5 5.5 0 00-5.25-4.9L10 3.5a5.5 5.5 0 00-5.47 4.91c.29.28.47.66.47 1.09v3a1.5 1.5 0 01-3 0v-3c0-.68.45-1.25 1.06-1.43A7 7 0 0110 2z" id="podcast_outline_20__Icon-Color" fill="currentColor" fill-rule="nonzero"/></g></g></g></svg>',name:"podcast_outline_20"}}a.d(t,{getIcon20PodcastOutline:()=>i})},651018:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.75 6.41a.75.75 0 00-1.5 0v7.18a.75.75 0 001.5 0V6.4zM6.5 8.3a.75.75 0 01.75.75v4.55a.75.75 0 01-1.5 0V9.04a.75.75 0 01.75-.75zm7.75 2.5a.75.75 0 00-1.5 0v2.8a.75.75 0 001.5 0v-2.8z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3.75 1.98c.8-.42 1.57-.6 3.38-.6h5.74c1.8 0 2.58.18 3.38.6a4.26 4.26 0 011.77 1.77c.42.8.6 1.57.6 3.38v5.74c0 1.8-.18 2.58-.6 3.38a4.26 4.26 0 01-1.77 1.77c-.8.42-1.57.6-3.38.6H7.13c-1.8 0-2.58-.18-3.38-.6a4.26 4.26 0 01-1.77-1.77c-.42-.8-.6-1.57-.6-3.38V7.13c0-1.8.18-2.58.6-3.38a4.26 4.26 0 011.77-1.77zm3.38.9c-1.7 0-2.19.17-2.67.43-.5.26-.89.65-1.15 1.15-.26.48-.44.98-.44 2.67v5.74c0 1.7.18 2.19.43 2.67.27.5.66.89 1.16 1.15.48.26.98.43 2.67.43h5.74c1.7 0 2.19-.17 2.67-.43a2.76 2.76 0 001.15-1.15c.26-.48.43-.98.43-2.67V7.13c0-1.7-.17-2.19-.43-2.67a2.76 2.76 0 00-1.15-1.15c-.48-.26-.98-.44-2.67-.44H7.13z" fill="currentColor"/></svg>',name:"poll_outline_20"}}a.d(t,{getIcon20PollOutline:()=>i})},249564:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g id="recent_outline_20__Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="recent_outline_20__Icons-20/recent_outline_20-@-clock,-time"><g id="recent_outline_20__recent_outline_20"><path d="M0 0h20v20H0z"/><path d="M10 1.5a8.5 8.5 0 110 17 8.5 8.5 0 010-17zM10 3a7 7 0 100 14 7 7 0 000-14zm-.75 3c.41 0 .75.34.75.75v3.23l2.77 1.07a.75.75 0 01-.54 1.4L8.98 11.2a.75.75 0 01-.48-.7V6.75c0-.41.34-.75.75-.75z" id="recent_outline_20__Icon-Color" fill="currentColor" fill-rule="nonzero"/></g></g></g></svg>',name:"recent_outline_20"}}a.d(t,{getIcon20RecentOutline:()=>i})},213053:(e,t,a)=>{"use strict";function i(){return{icon:'<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.82 6.96a.75.75 0 000-1.06L10.53 1.6a.75.75 0 00-1.06 0L5.18 5.9a.75.75 0 101.06 1.06l3.01-3v9.18a.75.75 0 001.5 0V3.95l3 3a.75.75 0 001.07 0z" fill="currentColor"/><path d="M4 12a.75.75 0 00-1.5 0v1.25a4.5 4.5 0 004.5 4.5h6a4.5 4.5 0 004.5-4.5V12a.75.75 0 00-1.5 0v1.25a3 3 0 01-3 3H7a3 3 0 01-3-3V12z" fill="currentColor"/></svg>',name:"share_external_outline_20"}}a.d(t,{getIcon20ShareExternalOutline:()=>i})},934397:(e,t,a)=>{"use strict";function i(){return{icon:'<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M10 17a7 7 0 110-14 7 7 0 010 14zm-8.5-7a8.5 8.5 0 1117 0 8.5 8.5 0 01-17 0zm8.65 3.38l2.7-1.56a2.1 2.1 0 000-3.64l-2.7-1.56A2.1 2.1 0 007 8.44v3.12a2.1 2.1 0 003.15 1.82zm1.95-3.9c.4.23.4.8 0 1.04l-2.7 1.56a.6.6 0 01-.9-.52V8.44c0-.46.5-.75.9-.52z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"video_circle_outline_20"}}a.d(t,{getIcon20VideoCircleOutline:()=>i})},1313:(e,t,a)=>{"use strict";function i(){return{icon:'<svg fill="none" height="56" viewBox="0 0 56 56" width="56" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor"><path clip-rule="evenodd" d="M26.5 19.5c0-.83.67-1.5 1.5-1.5a10 10 0 0110 10 1.5 1.5 0 01-3 0 7 7 0 00-7-7 1.5 1.5 0 01-1.5-1.5zM6.13 14.42A11.86 11.86 0 004 21.44V34c0 .58.08 1.8.23 3.04.14 1.18.37 2.63.75 3.53.53 1.29 1.29 2.58 2.3 3.63 1.14 1.36 2.8 2.3 4.47 2.89 1.71.6 3.58.91 5.25.91h21c2.79 0 4.98-.35 6.8-1.08l3.64 3.64a1.5 1.5 0 002.12-2.12l-42-42a1.5 1.5 0 10-2.12 2.12l3.15 3.16a7.75 7.75 0 00-3.46 2.7zm5.87-.14c-1.32 0-2.53.67-3.46 1.92A8.88 8.88 0 007 21.44V34c0 .42.07 1.5.2 2.68.15 1.22.35 2.28.55 2.75.42 1.02 1 1.98 1.77 2.77a7.2 7.2 0 003.23 2.06c1.39.5 2.92.74 4.25.74h21c1.83 0 3.26-.17 4.42-.46l-8.49-8.49a10 10 0 01-13.98-13.98l-7.8-7.8zM21 28a7 7 0 0010.78 5.9l-9.68-9.68A6.96 6.96 0 0021 28z" fill-rule="evenodd"/><path d="M22 5.5c-1.21 0-2.21.6-2.92 1.16-.72.58-1.33 1.28-1.74 1.77l-.3.38a1.5 1.5 0 102.35 1.86l.25-.32c.41-.48.85-.97 1.31-1.35.49-.38.83-.5 1.05-.5h12c.22 0 .56.12 1.05.5.5.4.94.9 1.33 1.39l.43.54 1.02 1.27a5.42 5.42 0 002.42 1.6c.88.3 1.86.48 2.75.48h1c1.32 0 2.53.67 3.46 1.92A8.88 8.88 0 0149 21.44V34c0 .5 0 1.43-.1 2.48a9.84 9.84 0 01-1 3.6 1.5 1.5 0 002.67 1.36l.4-.82c.55-1.22.8-2.66.91-3.85.12-1.2.12-2.26.12-2.76V21.44c0-2.67-.76-5.16-2.13-7.02A7.26 7.26 0 0044 11.28h-1c-.52 0-1.17-.1-1.74-.32-.61-.21-.96-.47-1.09-.63L39.2 9.1l-.53-.66c-.41-.49-1.02-1.2-1.74-1.77A4.74 4.74 0 0034 5.5z"/></g></svg>',name:"camera_off_outline_56"}}a.d(t,{getIcon56CameraOffOutline:()=>i})},963188:(e,t,a)=>{"use strict";a.d(t,{createPostTooltip:()=>s,updatePostTooltipActionRadioBtn:()=>d,getPostTooltipOptionText:()=>l});var i=a(315544),o=a(99392),n=a(386409),r=a(333200),s=(e,t,a)=>{var n=t||"",r=e+n,s=(0,i.ge)(r),d=(0,i.geByClass1)("post_action_tt_content",s),l=(0,i.geByClass1)("post_action_btn_layout",s),c=d.children;if(window.radioBtns["post_settings_btn"+e+n]={val:!1,els:c},!(0,i.hasClass)(s,"disabled")){var _=[-12*(window.vk.rtl?-1:1),7],p=new o.default(l,{appendTo:s,forceSide:"bottom",autoShow:!1,cls:"eltt_fancy eltt_fancy_actions",noOverflow:!1,centerShift:0,offset:_,content:d,align:"left",onFirstTimeShow:()=>{(0,i.show)(d)}});return cur[e+n]=p,cur.destroy.push((function(){p&&p.destroy()})),a&&(cur[e+n+"_onChange"]=a),{toooltip:p}}},d=(e,t,a)=>{if(window.radioBtns[a]&&!(0,i.hasClass)(e,"disabled"))return window.radioBtns[a].els.forEach((t=>{if(t===e){if(e.querySelector(".FancyElementTT__checkIcon"))return;var a=`<span class="FancyElementTT__checkIcon">${(0,r.getIcon16Done)().icon}</span>`;t.innerHTML=a+t.innerHTML}else{var i=t.querySelector(".FancyElementTT__checkIcon");null==i||i.remove()}})),(0,n.radiobtn)(e,t,a)},l=e=>{var t;return null===(t=e.querySelector(".FancyElementTT__itemLabel"))||void 0===t?void 0:t.innerHTML}},833796:(e,t,a)=>{"use strict";a.d(t,{MEDIA_SELECTOR_GROUP:()=>ke,MEDIA_SELECTOR_PRODUCT:()=>Ce,MediaSelector:()=>je});a(530522),a(579665),a(95767),a(991181),a(940851),a(820075),a(66108),a(296253),a(283946),a(21466),a(751876),a(175115),a(59357);var i=a(961540),o=a(386409),n=a(654612),r=a(376852),s=a(887294),d=a(789466),l=a(695724),c=a(850167),_=a(19331),p=a(452644),u=a(80842),h=a(745626),g=a(40906),v=a(761508),m=a(962857),w=a(177801),f=a(401143),b=a(173234),k=a(478441),y=a(650302),C=a(95484),M=a(185931),I=a(651018),T=a(508723),A=a(249564),x=a(116206),D=a(1313),P=a(290686),S=a(651848),B=a(743707),$=a(562487),E=a(768186),L=a(557747),O=a(628661),N=a(677990),z=a(213053),U=a(105539),R=a(934397),V=a(270908),H=a(963188),F=a(124041),q=a(786067);function j(){return j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e},j.apply(this,arguments)}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var a=[],i=!0,o=!1,n=void 0;try{for(var r,s=e[Symbol.iterator]();!(i=(r=s.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){o=!0,n=e}finally{try{i||null==s.return||s.return()}finally{if(o)throw n}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return G(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);"Object"===a&&e.constructor&&(a=e.constructor.name);if("Map"===a||"Set"===a)return Array.from(a);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return G(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,i=new Array(t);a<t;a++)i[a]=e[a];return i}var Y="poll",K="graffiti",X="photos_list",Q="photo",J="video",Z="audio",ee="doc",te="map",ae="note",ie="postpone",oe="mark_as_ads",ne="share",de="pretty_cards",le="gift",_e="money",pe="market",ue="market_services",he="article",ve="podcast",me="story",we="narrative",fe="page",be="album",ke="group",ye="copyright",Ce="product",Me=p.MEDIA_TYPE_DONUT_DURATION,Ie="textlive",Te="situational_theme",Ae=1e3,xe=864e5,De=30*xe,Pe="anonymous",Se="answers",Be="lang",$e="poll_id",Ee="poll_fixed",Le="poll_closed",Oe="poll_background_id",Ne="poll_photo_id",ze="poll_until",Ue="poll_is_multiple",Re="poll_disable_unvote",Ve="poll_is_board",He="poll_is_edit",Fe="poll_answers_limit",qe=/^invite\/[a-zA-Z0-9]{7}$|/,je=function(e,t,a,G,xe,je){var We,Ge=[],Ye=(G=G||{}).mediaHandlers||{},Ke=G.from;each(a||[],(function(t,a){var i=a[0],s=a[1],d=a[2];if(s){var l=!1,c=G.toId||cur.postTo,_={to_id:c,blockPersonal:G.blockPersonal};_.mail_add=G.mail?1:"",_.from=G.from;var p={};switch(i){case K:l=()=>{(0,n.showBox)("al_wall.php",{act:"canvas_draw_box"},{stat:[jsc("web/graffiti_new.js")],cache:1,dark:1,onDone:(e,t)=>{window.Graffiti.initDrawBox(e,t)}})};break;case X:l=n.showBox.pbind("al_photos.php",extend(_,{act:"choose_photo"}),{cache:1,stat:[jsc("web/photos.js"),"photos.css",jsc("web/upload.js")],dark:1});break;case Q:l=Ye.photo?Ye.photo.pbind(G):n.showBox.pbind("al_photos.php",extend(_,{act:"choose_photo",max_files:G.limit||10,no_album_select:~(G.disabledTypes||[]).indexOf("album")?1:""}),{cache:1,stat:[jsc("web/photos.js"),"photos.css",jsc("web/upload.js")],dark:1});break;case J:var u=extend(_,{act:"a_choose_video_box",max_files:G.limit||10});l=function(){(0,n.showBox)("al_video.php",u,{cache:1,dark:1})};break;case Z:l=function(){stManager.add([jsc("web/audio.js"),jsc("web/indexer.js"),jsc("web/auto_list.js"),jsc("web/grid_sorter.js"),"audio.css"],(function(){var t=!1;each(We.chosenMedias||[],(function(){"audio_playlist"===this[0]&&(t=!0)})),cur.audioAttachOriginalOwnerId=!1,cur.audioAttachSwitchOwnerId=!1;var a=vk.id,i=parseInt((""+_.to_id||"").replace(/^board/,"-")),o=domClosest("_submit_post_box",e);domData(o,"from-oid")<0||"im"===cur.module&&cur.gid?(a=i,cur.audioAttachOriginalOwnerId=i,cur.audioAttachSwitchOwnerId=vk.id):cur.hasGroupAudioAccess&&(cur.audioAttachOriginalOwnerId=vk.id,cur.audioAttachSwitchOwnerId=i),AudioPage.showAttachBox(a,{canPlaylistAttach:!t&&!cur.editor,onAudioChoose:AudioUtils.onAudioChoose,onPlaylistChoose:AudioUtils.onPlaylistChoose})}))};break;case Y:l=()=>We.chooseMedia(Y,"",d);break;case ee:l=Ye.doc?Ye.doc.pbind(G):n.showBox.pbind("docs.php",Object.assign(_,G.docParams,{act:"a_choose_doc_box"}),{stat:["docs.css"]});break;case te:l=n.showBox.pbind("al_places.php",extend(_,{act:"a_choose_place_box"}),{stat:["places.css","map.css","maps.js","ui_controls.css","ui_controls.js","boxes.css"],width:640,bodyStyle:"padding: 0px;",dark:1});break;case ae:l=showWiki.pbind({note:"new"},!0,!1,{queue:1});break;case ie:l=e=>{if(je){if(hasClass(e.target,"_close"))return We.unchooseMedia(We.postponeInd),void cancelEvent(e);var t=()=>{cur["postPostponeTT"+We.lnkId].show(),triggerEvent(geByClass1("datepicker_control",cur["postPostponeTT"+We.lnkId]._ttel),"mousedown",!1,!0);var e=!We.postponeDate;We.postponeDate=val("postpone_date"+We.lnkId),e&&We.chooseMedia(ie,We.postponeDate,d)};We.postponeDatepicker?"DP_PLACEHOLDER"!==We.postponeDatepicker&&t():(cur.postponedLastDate&&(d.date=intval(cur.postponedLastDate)+3600),We.postponeDatepicker="DP_PLACEHOLDER",We.setupPostpone(d,null,t))}else We.chooseMedia(ie,s,d)};break;case Me:p.onMediaTypeInit=e=>{e.addMedia.donutVisibilityAddSelect&&e.addMedia.donutVisibilityAddSelect(e)},l=()=>{};break;case oe:l=()=>We.chooseMedia("mark_as_ads",s,d);break;case ne:l=function(e){e=e||{},window.onShareChooseUrlBoxInit=function(){var e=geByClass1("share_url_input",curBox().bodyNode);addEvent(e,"keydown",(function(e){if(e.which==KEY.ENTER)return a(curBox().btns.ok[0],e),!1}))};var t=(0,n.showBox)("share.php",{act:"choose_url_box"},{dark:1});function a(a,i){var n=geByClass1("share_url_input",t.bodyNode),r=val(n);(0,o.lockButton)(a),disable(n,!0),hide("share_url_error"),We.chooseMedia("share",s,extend(d,{url:r,draft:!0,onSuccess:function(){disable(n,!1),(0,o.unlockButton)(a),t.hide(),e.videoId&&window.AdsEdit&&window.AdsEdit.showSnippetVideo&&window.AdsEdit.showSnippetVideo(e.videoId)},onError:function(e){var t="";e&&e!==(0,q.getLang)("global_unknown_error")&&-1===e.indexOf("ERR_PAGE_GET_FAILED")&&(t=e+" "),disable(n,!1),(0,o.unlockButton)(a),ge("share_url_error").innerHTML=t+(0,q.getLang)("global_share_link_failed"),show("share_url_error")}}))}t.removeButtons(),t.addButton((0,q.getLang)("global_continue"),a)};break;case de:l=function(e){e&&e.replace_owner_id&&(d.editor.owner_id=e.replace_owner_id),We.chooseMedia("pretty_cards",s,d)};break;case le:l=function(){var e=(e=G.peer<2e9?G.peer:0)||cur.peer;G.giftBoxPrepare&&G.giftBoxPrepare(e),(0,n.showBox)("al_gifts.php",{act:"get_gift_box",mid:e,fr:e==vk.id?1:0,ref:"media_selector"},{stat:["gifts.css","wide_dd.js","wide_dd.css"],dark:1})};break;case _e:l=function(){var e=cur.peer;c>-2e9&&c<0&&(_.owner_id=c),m.MoneyTransfer.showMoneyTransferBox(extend(_,{to_id:e}),{},(e=>(curBox()&&curBox().hide(),setTimeout((0,n.showFastBox)((0,q.getLang)("global_error"),e).hide,2e3),!0)))};break;case pe:c==vk.id?(l=()=>window.showAttachProductBox(null,(e=>{var t=W(e.id.split("_"),2),a=t[0],i=t[1];window.MarketChooseBox.attachItem({type:"item",ownerId:a,itemId:i})})),d.tt_words&&(cur.checkMessageHandler=function(e){if(!cur.marketIntroShown&&(e=" "+e+" ").match(new RegExp("\\s("+d.tt_words.join("|")+")\\s","i"))){var t=getSize(We.menu.moreWrap);(0,r.showTooltip)(We.menu.moreWrap,{text:d.tt_text,dir:"left",slideX:15,width:230,shift:[-t[0]-5,-t[1]/2],hasover:1}),cur.marketIntroShown=!0}})):l=n.showBox.pbind("al_market.php",extend(_,{act:"a_choose_product_box"}),{cache:1});break;case ue:l=()=>{(0,n.showBox)("/al_market.php",j({act:"a_choose_product_box"},_,{album_id:-2}),{cache:1})};break;case he:l=()=>openArticleEditor(c);break;case ve:l=function(){stManager.add([jsc("web/podcast.js")],(function(){Podcast.select()}))}}l&&Ge.push([i,s,l,p])}})),t=ge(t||"media_preview"),xe=!1!==xe&&ge(xe||"post_settings_btn"),je=!1!==je&&ge(je||"post_actions_btns");var Xe=G.limit||10,Qe=cur.pbIsTextlive||Xe>1,Je=G.editable&&(!browser.msie||parseInt(browser.version)>8),Ze=G.sortable&&(!browser.msie||parseInt(browser.version)>8),et=!!je,tt=function(e,t,a){if(!(e=ge(e)))return!1;a=a||{},window.__addMediaIndex||(window.__addMediaIndex=0);var i=++__addMediaIndex;e.innerHTML='<div class="media_selector clear_fix"></div>';var o,n=domByClass(e,"media_selector"),r=[],s={id:i,menuNode:n,types:t,lastTypes:t,activate:function(e){s.touched=!0===e,a.onActivate&&a.onActivate()},show:function(){if(o&&(clearTimeout(o),o=0),s.moreWrap&&!hasClass(s.moreWrap,"shown")){a.forceToUp||replaceClass(s.moreWrap,"to_up","to_down");var e=domByClass(s.moreWrap,"_more_items");(getClientRectOffsetY(e)>0||a.forceToUp)&&replaceClass(s.moreWrap,"to_down","to_up"),setTimeout(addClass.pbind(s.moreWrap,"shown"),0)}},hide:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){if(!o){var t=function(){o=0,s.moreWrap&&removeClass(s.moreWrap,"shown")};if(e){var a=domByClass(s.moreWrap,"_more_items");hide(a),t(),setTimeout(show.pbind(a),0)}else o=setTimeout(t,300)}})),setOptions:function(e){extend(a,e)},setItems:function(e){for(window.tooltips&&tooltips.destroyAll(n);n.firstChild;)re(n.firstChild);var t=void 0!==a.hideAfterCount?a.hideAfterCount:4,i=void 0!==a.maxShown?a.maxShown:3,o=!1,d=a.hideItem,l=(d||e.length>t)&&(!browser.mobile||a.ignoreMobile),p=a.hideLabel||(0,q.getLang)("global_media_selector_more");function u(e,t,i,o,n,d){var l=ce("a",{innerHTML:o?t:'<span class="blind_label">'+t+"</span>",className:"ms_item ms_item_"+e+" _type_"+e}),c=document.createElement("span");if(c.classList.add("MediaSelector__mediaIcon"),c.innerHTML=function(e){switch(e){case Q:return(0,b.getIcon20CameraOutline)().icon;case J:return(0,R.getIcon20VideoCircleOutline)().icon;case Z:return(0,k.getIcon20MusicOutline)().icon;case ee:return(0,y.getIcon20DocumentOutline)().icon;case te:return(0,C.getIcon20PlaceOutline)().icon;case K:return(0,M.getIcon20BrushOutline)().icon;case Y:return(0,I.getIcon20PollOutline)().icon;case he:return(0,T.getIcon20ArticlesOutline)().icon;case ie:return(0,A.getIcon20RecentOutline)().icon;case ae:return(0,x.getIcon20ArticleBoxOutline)().icon;case le:return(0,P.getIcon20GiftOutline)().icon;case pe:return(0,S.getIcon20MarketOutline)().icon;case ue:return(0,L.getIcon20NotebookCheckOutline)().icon;case _e:return(0,O.getIcon20MoneyTransferOutline)().icon;case oe:return(0,N.getIcon20AdvertisingOutline)().icon;case ne:return(0,z.getIcon20ShareExternalOutline)().icon;case de:return(0,V.getIcon20ColumnsSquare)().icon;case ve:return(0,E.getIcon20PodcastOutline)().icon}return""}(e),l.firstChild?l.insertBefore(c,l.firstChild):l.appendChild(c),!o&&s.moreWrap?domInsertBefore(l,s.moreWrap):(o||n).appendChild(l),l.setAttribute("tabindex",0),!o){l.setAttribute("data-title",t),l.setAttribute("aria-label",t),l.setAttribute("role","link");var _=function(){showTitle(this,!1,d||!1,{noZIndex:!0})};addEvent(l,"mouseover",_),r.push((function(){removeEvent(l,"mouseover",_)}))}if(i&&!cur.viewAsBox){var p=function(){return s.activate(),s.hide(!0),a.onItemClick&&!a.onItemClick(e)||i(),!1};addEvent(l,"click",p),r.push((function(){removeEvent(l,"click",p)}))}}s.moreWrap=!1,s.lastTypes=e,each(e,(function(e,t){var h=t[0],g=t[1],v=t[2];if(h===he){if(!(0,_.partConfigEnabled)("inline_attaches_icons"))return void((0,c.isArticleEditorAvailable)()&&u(h,g,v,!1,n,[6,8]));if(!(0,c.isArticleEditorAvailable)())return}if(h===ie&&et&&!s.postponeBtn){var m=(0,q.getLang)("wall_publication_now"),w=(0,$.getIcon12Dropdown)().icon;s.postponeBtn=se(`<div class="post_action_btn has_cross" id="post_postpone_btn${s.id}">\n                <div class="post_action_btn_layout">\n                  <span class="post_action_btn_text" role="button" aria-label="${replaceEntities(m)}">${m}</span>\n                  <span class="post_action_image_btn" role="button">${w}</span>\n                  <div class="post_action_tt_content _postpone" id="post_postpone_tt_content${s.id}" onclick="cancelEvent(event)"></div>\n                </div>\n               </div>`),a.actionsEl.appendChild(s.postponeBtn);var f="post_postpone_btn"+s.id,b=ge(f),k=geByClass1("post_action_tt_content",b),y=geByClass1("post_action_btn_layout",b),C=[-4*(vk.rtl?-1:1),4],M=new ElementTooltip(y,{appendTo:domPN(b),forceSide:"bottom",autoShow:!1,customShow:!0,cls:"_postpone timer_in_tt",noOverflow:!1,centerShift:0,offset:C,content:k,noHideOnClick:!0,align:"left",onShow:()=>{We.activeState=!0},onHide:()=>{We.activeState=!1,setTimeout((()=>{We.postponeDatepicker&&We.postponeDatepicker.hide()}),ElementTooltip.FADE_SPEED)},onFirstTimeShow:function(){show(k)}});return cur["postPostponeTT"+s.id]=M,cur.destroy.push((function(){M&&M.destroy()})),addEvent(s.postponeBtn,"click",v),void r.push((function(){removeEvent(s.postponeBtn,"click",v)}))}if(h!==Me){if(l&&(d?h==d:e==i)){var I=n.appendChild(ce("div",{className:"ms_items_more_wrap"})),T=function(){s.show()},A=function(e){0===e.detail&&hasClass(s.moreWrap,"shown")?s.hide():s.show()},x=function(){s.hide()};addEvent(I,"mouseenter",T),addEvent(I,"click",A),addEvent(I,"mouseleave",x),r.push((function(){removeEvent(I,"mouseenter",T),removeEvent(I,"click",A),removeEvent(I,"mouseleave",x)}));var D=p;if(a.vectorIcon)D='<span class="blind_label">'+p+"</span>",addClass(I,"ms_items_more_wrap_vector");else D+=`<span class="MediaSelector__moreIcon">${(0,$.getIcon12Dropdown)().icon}</span>`;var P=I.appendChild(ce("a",{className:"ms_item_more",innerHTML:'<span class="ms_item_more_label">'+D+"</span>"}));P.setAttribute("tabindex",0),P.setAttribute("role","button"),P.setAttribute("aria-label",p);var S=ce("div",{className:"ms_items_more_helper"});o=ce("div",{className:"ms_items_more _more_items"}),S.appendChild(o),I.appendChild(S),s.moreWrap=I}u(h,g,v,o,n)}}))},enqueueOnAddMediaInit(e){},onAddMediaInit(e){}};t&&s.setItems(t),browser.msie&&(removeEvent(e,"MSPointerDown"),addEvent(e,"MSPointerDown",s.activate.pbind(!0)));removeEvent(e,"mouseover"),addEvent(e,"mouseover click",s.activate),a.global||cur.destroy.push((function(){removeEvent(e,"mouseover click",s.activate)}));a.forceToUp&&addClass(geByClass1("ms_items_more_wrap",n),"to_up");return s.handlersToClean=r,s}(e,Ge,{onActivate:function(){cur.attachCount=We.attachCount,cur.chooseMedia=We.chooseMedia,cur.getFrom=We.getFrom,cur.hasChosenMedia=We.hasChosenMedia,cur.lastAddMedia=We,cur.onMediaUploadStarted=G.onMediaUploadStarted,cur.showMediaProgress=We.showMediaProgress,cur.unchooseMedia=We.unchooseMedia,cur.updateChosenMedia=We.updateChosenMedia},onItemClick:function(e){return!(Qe&&We.attachCount()>=Xe&&"postpone"!==e&&"mark_as_ads"!==e&&e!==ye)||(vk.widget?(0,n.showBox)("blank.php",{code:1900,limit:Xe}):(0,n.showFastBox)((0,q.getLang)("global_error"),(0,q.getLang)("attachments_limit",Xe)),!1)},hideAfterCount:G.hideAfterCount,topOffset:G.topOffset,forceUp:G.forceUp,global:G.global,maxShown:G.maxShown,forceToUp:G.forceToUp,vectorIcon:G.vectorIcon,ignoreMobile:G.ignoreMobile,actionsEl:je,hideLabel:G.hideLabel});if(tt){var at=intval(tt.id);if(Qe){t.innerHTML=`<div id="page_pics_preview${at}" class="page_pics_preview media_preview clear_fix"></div><div id="page_dpics_preview${at}" class="page_pics_preview post_thumbed_media page_media_sortable media_preview clear_fix"></div><div id="page_docs_preview${at}" class="page_docs_preview post_thumbed_media page_media_sortable media_preview clear_fix"></div><div id="page_pdocs_preview${at}" class="page_docs_preview media_preview clear_fix"></div><div id="page_ldocs_preview${at}" class="page_docs_preview media_preview clear_fix"></div><div id="page_adocs_preview${at}" class="page_docs_preview media_preview clear_fix"></div><div id="page_mpics_preview${at}" class="page_pics_preview media_preview clear_fix"></div><div id="page_ppdocs_preview${at}" class="page_docs_preview media_preview _page_ppdocs_preview clear_fix"></div><div id="page_progress_preview${at}" class="page_progress_preview media_preview clear_fix"></div>`;var it=domFC(t),ot=domNS(it),nt=domNS(ot),rt=domNS(nt),st=domNS(rt),dt=domNS(st),lt=domNS(dt),ct=domNS(lt),_t=domNS(ct);removeClass(t,"media_preview"),removeClass(st,"vk_mini_app_preview"),removeClass(st,"vk_mini_app_preview_fixed"),addClass(t,"multi_media_preview")}else addClass(t,"med_no_attach"),show(t);return et&&(ct=ge("post_postpone_tt_content"+at)),We={_addMediaLink:e,lnkId:at,menu:tt,types:Ge,phLists:{},handlers:{},postponeIsTooltip:et,chosenMedias:[],limit:Xe,emitter:new v.default,eventTypes:{mediaUpdate:"mediaUpdate"},_showAddMedia:function(){tt.show()},_hideAddMedia:function(e){tt.hide(e)},hasRestrictingAttach:function(){return geByClass1("medadd_c_story",nt)},getFrom:()=>Ke,updateChosenMedia:function(e,t,a){We.chooseMedia(e,t,a,null,null,null,!0)},addOrUpdateChosenMedia(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var i=t[0],o=t[1];return(We.hasChosenMedia(i,o)?We.updateChosenMedia.bind(We):We.chooseMedia.bind(We))(...t)},hasChosenMedia:function(e,t){var a=!1;return each(We.chosenMedias,(function(){if(this[0]===e&&this[1]===t)return a=!0,!1})),a},chooseMedia:function(a,i,o,n,r,s,d){if(!cur.articleEditorLayer||a===he||a===Y){if(vk.widget&&(i=clean(i)),a===ie&&et&&null!=We.postponeInd)return!1;if(G.poster&&G.poster.isOpen()&&a!==ie&&a!==Me&&a!==ye&&a!==Te&&G.poster.closeEditor(),(We.attachCount()>=Xe&&void 0===o.upload_ind&&a!==ie&&a!==Me&&a!==Te&&a!==oe||We.hasRestrictingAttach())&&a!==ye){if(Qe)return!1;We.unchooseMedia()}if(G.skipDuplicates){var c=We.chosenMedias.find((e=>{if(!e)return!1;var t=W(e,2),i=t[0],o=t[1];return i===a&&o===e}));if(c)return!1}if(We.onChange&&!1===We.onChange(a,i,o,n))return void 0!==o.upload_ind&&re("upload"+o.upload_ind+"_progress_wrap"),!1;if(a===ae&&(cur.pbNoteAdded=!1),inArray(a,G.disabledTypes||[]))return!1;var p=!1,h={},g=null;if(Qe&&(each(We.chosenMedias,(function(e){if(g=e,this[0]==a&&this[1]==i)return p=!0,!1;h[this[0]]=h[this[0]]?h[this[0]]+1:1})),p&&!d||d&&!p))return!1;var v,m,w="",f="",b=!1,k=nt,y="",C="",M=!1,I="";switch(a){case K:if(h.pretty_cards)return!1;isObject(o)||(o={thumb:o||""}),w=`<div class="fl_l page_preview_graffiti"><img class="page_preview_graffiti" src="${(o=It(o)).thumb}" /></div>`,k=b=lt;break;case X:if(vk.widget||h.pretty_cards)return!1;hide(this._addMediaLink),vkImage().src=o[1],(A=o[3].replace(/^{|}$/g,""))&&(A+=","),A+='"queue":1';var T=o[5];T&&T.restrictionBlur&&(I+=" PostPhotoRestriction--blur PostPhotoRestriction--photosList PostPhotoRestriction--smallIcon"),T&&T.restrictionGeo&&(I+=" PostPhotoRestriction--geo PostPhotoRestriction--photosList PostPhotoRestriction--smallIcon"),w=`<div${G.nocl?"":` onclick="return showPhoto('${o[4]}', '${o[2]}', '${clean(A)});"`} class="fl_l page_preview_photo${I}"><img class="page_preview_photo" src="${o[1]}" /></div>`,k=b=it;break;case Q:if(h.pretty_cards)return!1;isObject(o)||(o={thumb_m:o[0]||"",thumb_s:o[1]||"",list:o[2]||"",view_opts:o[3]||"",upload_ind:o.upload_ind||void 0}),o=It(o),vkImage().src=o.thumb_m;var A=o.view_opts.replace(/^{|}$/g,"");if(vk.widget&&(A=A.replace(/&quot;/g,'"')),A&&(A+=","),A+='"queue":1',We.phLists[i]=o.list,Je){if(!o.editable)return!1;if(!G.nocl){var x="{"+A+"}";x=JSON.parse(x),o.editable.click=We.showPhoto.pbind(i,o.list,x)}}var D=parseJSON(o.view_opts);I="",D.temp&&D.temp.restrictionGeo&&(I+=" PostPhotoRestriction--geo"),D.temp&&D.temp.restrictionBlur&&(I+=" PostPhotoRestriction--blur"),w=`<div ${G.nocl?"":` onclick="return cur.addMedia[${We.lnkId}].showPhoto('${i}', '${o.list}', {${clean(A)}});"`} class="fl_l page_preview_photo${s?" page_preview_ph_graff":""}${I}"><img class="page_preview_photo" src="${o.thumb_m}" /></div>`,b=1,k=it;break;case J:if(isEmpty(o)||h.pretty_cards)return!1;if(isObject(o)||(o={thumb:o||""}),Je){if(!o.editable)return!1;G.nocl||(o.editable.click=showVideo.pbind(i,o.list_id,{queue:1,autoplay:1}))}(o=It(o)).preview&&!vk.widget?(w=o.preview,o.editable.preview=w):w=`\n              <div ${G.nocl?"":`onclick="return showVideo('${i}', '${o.list_id}', {queue:1,autoplay:1});"`} class="fl_l page_preview_video">\n                <img class="page_preview_video" src="${o.thumb}" />\n              </div>\n            `,b=1,k=it,m=o.list_id;break;case"donut_link":if(!o||h.donut_link)return!1;w='<div class="medadd_h medadd_h_pretty_cards inl_bl">'+(0,q.getLang)("groups_donut_snippet_link_title")+"</div>",f=o.snippet_html;break;case he:if(vk.widget||h.article||h.page||h.pretty_cards||!o)return!1;w='<div class="medadd_h medadd_h_pretty_cards inl_bl">'+(0,q.getLang)("global_article")+"</div>",f=o.snippet_html,i=o.url,o.rev&&(i+="?rev="+o.rev),k=st;break;case Z:if(h.pretty_cards)return!1;o=It(o),w=Page.addAudioPreview(clean(i),o),y=` id="pam${at}_audio${clean(i)}"`;break;case"audio_playlist":if(h.audio_playlist)return!1;(o=It(o)).id=intval(o.id),o.ownerId=intval(o.ownerId),vk.widget&&o.authorHref&&!o.authorHref.match(/^(https?:\/\/|\/)/)&&(o.authorHref=`https://${o.authorHref}`),vk.widget&&o.coverUrl&&!o.coverUrl.match(/^(https?:\/\/|\/)/)&&(o.coverUrl=`https://${o.coverUrl}`);var P=o.coverUrl?`background-image:url('${o.coverUrl}'); background-size: cover;`:"",S="";S=o.authorHref?`<a href="${o.authorHref}" onclick="return nav.go(this)">${o.authorName}</a>`:o.authorName;var B="'"+(o.accessHash||"")+"'";f='<div class="audio_pl_attach_preview _audio_pl _audio_pl_'+o.ownerId+"_"+o.id+' clear_fix"><div class="audio_pl_attach_preview__play" onclick="return getAudioPlayer().playPlaylist('+o.ownerId+", "+o.id+", "+B+')"></div><div class="audio_pl_attach_preview__cover" style="'+P+'">'+(o.gridCovers||"")+'</div><div class="audio_pl_attach_preview__title">'+o.title+'</div><div class="audio_pl_attach_preview__info_line">'+S+"</div></div>",w='<span class="medadd_h">'+(0,q.getLang)("global_audio_playlist")+"</span>",k=st;break;case"artist":if(h.artist)return!1;var $=o.coverUrl?`background-image:url('${o.coverUrl}');`:"",E="",L="";o.blockId&&(E=`<div class="MusicAuthorSnippet__play" onclick="return getAudioPlayer().playBlock('${o.ownerId}', 'artist${o.blockId}', '', '', 'artist')">${(0,q.getLang)("audio_listen_snippet")}</div>`,L="_audio_pl _audio_pl_${data.ownerId}_artist${data.blockId}"),f=`<div class="MusicAuthor_attach_preview _MusicAuthor ${L} clear_fix">\n              <div class="MusicAuthorSnippet__cover" style="${$}"></div>\n              <div class="MusicAuthorSnippet__info">\n                ${E}\n                <div class="MusicAuthorSnippet__title">${o.title}</div>\n                <div class="MusicAuthorSnippet__subtitle">${(0,q.getLang)("global_artist")}</div>\n              </div>\n            </div>`,w='<span class="medadd_h">'+(0,q.getLang)("global_artist")+"</span>",k=st;break;case"curator":if(h.curator)return!1;var O="",N="",z=o.coverUrl?`background-image:url('${o.coverUrl}');`:"";o.blockId&&(O=`<div class="MusicAuthorSnippet__play" onclick="return getAudioPlayer().playBlock('${o.ownerId}', '${o.blockId}', '', '', 'curator')">${(0,q.getLang)("audio_listen_snippet")}</div>`,N="_audio_pl _audio_pl_${data.ownerId}_curator${data.blockId}"),f=`<div class="MusicAuthor_attach_preview _MusicAuthor ${N} clear_fix">\n              <div class="MusicAuthorSnippet__cover" style="${z}"></div>\n              <div class="MusicAuthorSnippet__info">\n                ${O}\n                <div class="MusicAuthorSnippet__title">${o.title}</div>\n                <div class="MusicAuthorSnippet__subtitle">${(0,q.getLang)("global_curator")}</div>\n              </div>\n            </div>`,w='<span class="medadd_h">'+(0,q.getLang)("global_curator")+"</span>",k=st;break;case"video_playlist":if(vk.widget||h.video_playlist||!o.snippet_html)return!1;f=(o=It(o)).snippet_html,w='<span class="medadd_h">'+(0,q.getLang)("global_audio_playlist")+"</span>",k=st;break;case ee:if(vk.widget||h.pretty_cards)return!1;if(o.editable){var U="stopEvent(event);";(o=It(o)).hasBox&&(o.editable.click=e=>{Page.showGifBox(o.id,o.ownerId,intval(o.postId),intval(o.postOwnerId),o.hash,e)},U=`Page.showGifBox(${intval(o.id)}, ${intval(o.ownerId)}, ${intval(o.postId)}, ${intval(o.postOwnerId)}, '${o.hash}', event);`),C+=" page_preview_doc_as_photo_wrap";var R=W(o.editable.sizes.m||o.editable.sizes.s,1)[0];w=`<a href="${o.editable.href}" onclick="${G.nocl?"":U}" class="page_preview_doc_as_photo" target="_blank" rel="noopener" style="background-image: url('${R}');"><img class="page_preview_doc_as_photo" src="${R}" />${o.editable.label}</a>`,b=1,k=it}else o.thumb&&o.thumb_s?(w="gif"==o.ext?'<a onclick="if (cur.cancelClick) return (cur.cancelClick = false);" target="_blank" rel="noopener" href="'+o.href+'" class="pam_dpic"><div class="page_preview_doc_photo"><img src="'+o.thumb+'" align="center" /></div><div class="page_preview_doc_photo_hint doc_gif">'+o.title+"</div>":'<a onclick="if (cur.cancelClick) return (cur.cancelClick = false);" target="_blank" rel="noopener" href="'+o.href+'" class="pam_dpic"><div class="page_preview_doc_photo"><img src="'+o.thumb+'" align="center" /></div><div class="page_preview_doc_photo_hint">'+o.title+"</div>",f='</a><div class="pam_bg"></div>',k=b=ot,y=' id="pam'+at+"_doc"+i+'"'):(w="",f='<div class="page_doc_row"><a target="_blank" rel="noopener" href="'+o.href+'" class="page_doc_icon page_doc_icon'+intval(o.type)+'"></a><a target="_blank" href="'+o.href+'" class="page_doc_title">'+o.title+'</a><div class="page_doc_description_row"><div class="page_doc_size">'+o.size_str+"</div></div></div>",y=' id="pam'+at+"_doc"+i+'"');break;case me:if(vk.widget||h.pretty_cards)return!1;w='<div class="medadd_c_story"><a target="_blank" rel="noopener" '+o.attr+'"><div class="medadd_c_story_thumb fl_l" style="background-image:url('+o.thumb+')"></div></a><div class="medadd_c_story_info fl_l"><a class="medadd_c_story_title" target="_blank" '+o.attr+'">'+o.title+'</a><div class="medadd_c_story_desc">'+o.date_string+"</div></div>",hide(e);break;case we:if(h.narrative)return!1;w='<span class="medadd_h">'+(0,q.getLang)("global_type_narrative")+"</span>",f=o.snippet_html;break;case"mask":if(vk.widget||h.pretty_cards)return!1;w='<div class="medadd_c_mask"><div class="medadd_c_story_thumb fl_l" style="background-image:url(/images/landings/vkmasks/masksSnippet_2x.png)"></div></a><div class="medadd_c_story_info fl_l"><div class="medadd_c_story_title">'+o.share.title+'</div><div class="medadd_c_story_desc">'+o.share.desc+"</div></div>";break;case ne:if(h.share||h.page||h.pretty_cards||h.market||!o.lang)return!1;if(isArray(o)&&(o={domain:o[0],url:o[1],initialPattern:o[2],title:o[3],description:o[4],images:[o[5]],user_id:o[6],photo_id:o[7]}),M=o.is_vk_mini_app,o.draft){var V={onSuccess:o.onSuccess,onError:o.onError};return We.checkURL(o.url,void 0,o.checkUrlAdditionalParams||{},V),!1}if(!o.title&&!(cur.options.share||{}).allow_preview_empty_links)return(o.onError||function(){})(),!1;M?(o.title=clean((0,l.unclean)((0,l.unclean)((o.title||"").replace(/\n/g,"\\n")))),o.description=(0,l.unclean)((o.description||"").replace(/\n/g,"\\n"))):(o.title=clean((0,l.unclean)((0,l.unclean)((o.title||"").replace(/<br>/g,"\n")))),o.description=(0,l.unclean)((o.description||"").replace(/<br>/g,"\n")),o.description_short=(0,l.unclean)((o.description_short||"").replace(/<br>/g,"\n")),o.description_narrow=(0,l.unclean)((o.description_narrow||"").replace(/<br>/g,"\n"))),cur.options=cur.options||{},cur.options.share&&cur.options.share.max_title_len&&(o.title=(o.title||"").substr(0,cur.options.share.max_title_len)),cur.options.share&&cur.options.share.max_desc_len&&(o.description=(o.description||"").substr(0,cur.options.share.max_desc_len),o.description_short=(o.description_short||"").substr(0,cur.options.share.max_desc_len),o.description_narrow=(o.description_narrow||"").substr(0,cur.options.share.max_desc_len)),o.media=o.media||i,o.lang&&(cur.lang=extend(cur.lang||{},o.lang));var H={};if(vk.widget&&o.images_proxy_url&&o.images_proxy&&o.images_proxy.length&&(H={images_proxy_url:o.images_proxy_url,images_proxy:o.images_proxy.slice()}),o=extend(It(o),H),w='<a target="_blank" rel="noopener" href="/away.php?to='+encodeURIComponent(o.url)+'" class="medadd_h medadd_h_link inl_bl">'+clean((0,l.unclean)(o.is_vk_mini_app?o.lang.global_vk_mini_app:o.lang.profile_choose_link))+"</a>",M){var j="vk_mini_app_preview";(0,_.partConfigEnabled)("mini_apps_web_fixed_snippet_subtitle")&&(j+=" vk_mini_app_preview_fixed"),addClass(st,j)}if(!o.prometheus&&!o.verification&&o.map_data){var le=Tt(st),_e="";_e=o.map_data[3]?o.map_data[3].replace("size=0,0","size="+le.width+","+le.height):"/maps?lat="+floatval(o.map_data[0])+"&lng="+floatval(o.map_data[1])+"&z=11&"+(window.isRetina()?"w="+2*le.width+"&h="+2*le.height:"w="+le.width+"&h="+le.height);var ue="";(0,_.partConfigEnabled)("maps_no_referrer")&&(ue='referrerpolicy="no-referrer"'),w+=`<div class="medadd_c_share_map"><a onclick="return showBox('al_places.php', {act: 'geo_box', lat: ${floatval(o.map_data[0])}, long: ${floatval(o.map_data[1])}, provider: ${intval(o.map_data[3])}}, {dark: 1});"><div class="page_media_map_point"></div><img class="page_preview_map" ${ue} width="${le.width}" height="${le.height}" src="${_e}" /></a></div>`}if(We.shareData=extend(We.shareData||{},o,{imagesStyles:[""]}),k=st,(o.onSuccess||function(){})(),(cur.options.share||{}).button_exclusive&&o.shareButtons)hide(e),(xe=ge("signed"))&&disable(xe);hide(domByClass(tt.menuNode,"_type_share")),hide(domByClass(tt.menuNode,"_type_market"));break;case de:if(h.share||h.pretty_cards||vk.widget)return!1;var xe;w='<div class="medadd_h medadd_h_pretty_cards inl_bl">'+o.lang.global_wall_pretty_cards+"</div>",(xe=ge("signed"))&&disable(xe),hide(domByClass(tt.menuNode,"_type_pretty_cards")),hide(e),k=st;break;case Y:if(!o.lang||vk.vidget||h.poll||!rt||h.pretty_cards)return!1;hide(domByClass(tt.menuNode,"_type_poll")),k=rt;break;case te:if(vk.widget||h.pretty_cards)return!1;var De=Tt(lt);ue="";(0,_.partConfigEnabled)("maps_no_referrer")&&(ue='referrerpolicy="no-referrer"'),w=`<span class="medadd_h medadd_h_link inl_bl">${clean((0,l.unclean)(o[4]))}</span><div class="fl_l medadd_c_map"><a onclick="return showBox('al_places.php', {act: 'geo_box', lat: ${floatval(o[0])}, long: ${floatval(o[1])}, provider: ${intval(o[3])}}, {dark: 1});"><div class="page_media_map_point"></div><img class="page_preview_map" ${ue} width="${De.width}" height="${De.height}" src="/maps?lat=${floatval(o[0])}&lng=${floatval(o[1])}&z=11&w=${De.width}&h=${De.height}" /></a></div>`,k=b=lt,hide(domByClass(tt.menuNode,"_type_map"));break;case fe:if(h.share||h.page||!o.lang||vk.widget||h.pretty_cards)return!1;var Pe=o.media.split("_");w='<a href="/page'+o.media+'" onclick="return showWiki({oid: '+Pe[0]+", id: "+Pe[1]+'}, false, event, {queue: 1})" class="medadd_h medadd_h_page inl_bl">'+o.lang.profile_choose_page+"</a>",k=st;break;case be:if(vk.widget||h.pretty_cards)return!1;if(o.is_private_album){extend(o.editable,{title:o.title,size:0}),b=1,k=it;break}if(o.thumb.match(/^\/images\//)&&(o.thumb=""),Je){if(!o.editable)return!1;extend(o.editable,{title:o.title,size:o.count,click:!G.nocl&&nav.change.pbind({z:"album"+i})})}var Se=o.thumb;vkImage().src=Se,w=`<a class="${"fl_l page_album_link"+(Se?"":" page_album_nocover")}" ${v=G.nocl?"":' href="/album'+i+'" onclick="return nav.change({z: \'album'+i+"'}, event)\""}>\n              ${Se?`<div class="page_album_thumb_wrap"><img class="page_album_thumb" src="${Se}"/></div>`:""}\n              <div class="page_album_title">\n                <div class="page_album_size">${o.count}</div>\n                <div class="page_album_title_text">${o.title}</div>\n              </div>\n            </a>`,b=1,k=it;break;case ae:if(!o.lang||vk.widget||h.pretty_cards)return!1;w="<a onclick=\"showWiki({w: 'note"+o.raw+'\', edit: 1}, true, event, {queue: 1})" class="medadd_h medadd_h_note inl_bl">'+o.lang.profile_choose_note+"</a>",f='<div class="medadd_c medadd_c_note"><a onclick="showWiki({w: \'note'+o.raw+'\', edit: 1}, true, event, {queue: 1})" id="share_note_title'+o.raw+'">'+o.title+"</a></div>",k=st;break;case pe:if(vk.widget||h.pretty_cards||h.share||h.market||h.market_services)return!1;var Be="";o.thumb&&(Be='<a target="_blank" rel="noopener" href="'+o.href+'"><img class="medadd_c_market_thumb fl_l" src="'+o.thumb+'" /></a>'),w='<div class="medadd_c_market">'+Be+'<div class="medadd_c_market_info fl_l"><a class="medadd_c_market_title" target="_blank" href="'+o.href+'">'+o.title+'</a><div class="medadd_c_market_price">'+o.price+"</div></div>",hide(domByClass(tt.menuNode,"_type_market")),hide(domByClass(tt.menuNode,"_type_market_services"));break;case"market_album":if(vk.widget||h.pretty_cards)return!1;if(o.is_private_album){extend(o.editable,{title:o.title,msize:""}),b=1,k=it;break}if(Je){if(!o.editable)return!1;extend(o.editable,{title:o.title,msize:langNumeric(o.count,o.lang.profile_X_market_items),click:!1})}Pe=i.split("_");vkImage().src=o.thumb,v=G.nocl?"":' href="/market'+Pe[0]+"?section=album_"+Pe[1]+'"',w=`<a class="${"fl_l page_preview_album wall_album_cover_wrap wall_market_album_cover"+(o.thumb?"":" page_album_nocover")}" ${v}>\n              ${o.thumb?`<img class="wall_album_cover" src="${o.thumb}"/>`:""}\n              <div class="wall_album_caption">\n                <div class="wall_album_title_wrap clear_fix">\n                  <div class="wall_album_count fl_r">${o.count}</div>\n                  <div class="wall_album_title">${o.title}</div>\n                </div>\n              </div>\n            </a>`,b=1,k=it;break;case ye:if(vk.widget)return!1;We.copyrightCreate(o);break;case ie:if(vk.widget)return!1;var $e="";if(cur.editingPost&&!Qe)i=intval(i),o.date=i||intval(cur.editingPost[7]),F.FlatButton.setLabel(ge("wpe_save"),(0,q.getLang)("global_save")),$e=(0,q.getLang)("global_save");else if(cur.editingPost&&"wpe_media_preview"==t.id){i=intval(i),o.date=i||intval(cur.editingPost[7]);var Ee=geByClass1("medadd_c_timersett",ct);if(Ee){var Le=domPN(Ee);Ee=Le.innerHTML,re(Le)}else Ee="";F.FlatButton.setLabel(ge("wpe_save"),(0,q.getLang)("global_save")),$e=(0,q.getLang)("global_save")}else{o.draft?o.date=intval(i):cur.postponedLastDate&&(o.date=intval(cur.postponedLastDate)+3600);var Oe=ge("official");if(!(ut=gpeByClass("_submit_post_box",Oe))&&G.poster&&domClosest("poster",Oe)&&(ut=ge("submit_post_box")),Oe&&ut){var Ne=domData(ut,"from-oid"),ze=domData(ut,"oid");Ne==vk.id&&ze&&wall.setReplyAsGroup(Oe,{from:ze}),disable(Oe);var Ue=window.data(Oe,"tt");if(Ue&&Ue.rdBtns){var Re=Ue.rdBtns[1],Ve=Ue.rdBtnsGroup,He=domData(Re,"as");radiobtn(Re,He,Ve)}}var Fe=ge("send_post");Fe&&(F.FlatButton.setLabel(Fe,o.lang.profile_wall_postpone_btn),$e=o.lang.profile_wall_postpone_btn)}et?(We.updatePostponeBtn(!1,o.date),We.postponeDate=o.date):w=`<div class="medadd_h medadd_h_timer inl_bl">${o.lang.profile_choose_timer}<span id="postpone_preview${at}"></span></div>`,!We.postponeDatepicker&&et&&We.setupPostpone(o,Ee),G.poster&&G.poster.changeBtnText($e);var qe=Math.round((new Date).getTime()/Ae);intval(o.date)<qe&&(o.date=qe+3600),hide(domByClass(tt.menuNode,"_type_postpone")),k=ct;break;case Me:if(vk.widget)return!1;break;case oe:if(vk.widget)return!1;w='<div class="medadd_h medadd_h_mark_as_ads inl_bl">'+o.lang.global_ads_wall_post_mark_as_ads_action+"</div>",hide(domByClass(tt.menuNode,"_type_mark_as_ads")),k=ct;break;case"wall":if(vk.widget||h.pretty_cards)return!1;w='<div class="medadd_c_wall"><a target="_blank" rel="noopener" href="'+o.href+'"><img class="medadd_c_wall_thumb fl_l" src="'+o.thumb+'" /></a><div class="medadd_c_wall_info fl_l"><a class="medadd_c_wall_author" target="_blank" href="'+o.href+'">'+o.author+'</a><div class="medadd_c_wall_type">'+o.lang.title+"</div></div>",y=' id="pam'+at+"_wall"+i+'"',hide(e);break;case"wall_reply":if(vk.widget||h.pretty_cards)return!1;w='<div class="medadd_c_wall"><a target="_blank" rel="noopener" href="'+o.href+'"><img class="medadd_c_wall_thumb fl_l" src="'+o.thumb+'" /></a><div class="medadd_c_wall_info fl_l"><a class="medadd_c_wall_author" target="_blank" href="'+o.href+'">'+o.author+'</a><div class="medadd_c_wall_type">'+o.lang.title+"</div></div>",y=' id="pam'+at+"_wall_reply"+i+'"',hide(e);break;case ve:if(vk.widget||h.pretty_cards)return!1;var je="_im_media_preview"===domPN(k).id,Ge=!je&&cur.editingPost&&"wpe_media_preview"===domPN(k).id;if(je)w='<div class="medadd_c_podcast"><a target="_blank" rel="noopener" href="'+o.href+'"><img class="medadd_c_podcast_thumb fl_l" src="'+o.thumb+'" /></a><div class="medadd_c_podcast_info fl_l"><a class="medadd_c_podcast_title" target="_blank" href="'+o.href+'">'+o.title+'</a><div class="medadd_c_podcast_type">'+o.lang.title+"</div></div>";else{var Ye=!1;each(We.chosenMedias||[],(function(e,t){isArray(t)&&t[0]===ve&&(cur.addMedia[We.lnkId].unchooseMedia(e),Ye=!0)})),Ye&&We.onChange&&We.onChange(a,i,o,n),w='<div class="podcast_preview_title">'+(0,q.getLang)("audio_podcast_attach_media")+"</div>";var Ke=o.audio[AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]+"_"+o.audio[AudioUtils.AUDIO_ITEM_INDEX_ID];cur.podcastEditData={audioId:Ke,ref:"post",onCreate:function(e,t){We.chooseMedia(ve,e[AudioUtils.AUDIO_ITEM_INDEX_OWNER_ID]+"_"+e[AudioUtils.AUDIO_ITEM_INDEX_ID],{audio:e,coverUrl:t})}};var _t="<span class=\"podcast_snippet__edit\" onclick=\"cur.chooseMedia = cur.podcastEditData.chooseMedia; stManager.add([jsc('web/podcast.js')], function() { Podcast.edit('"+Ke+"'); });\"></span>";w+='<div class="podcast_snippet_loading" id="podcast_loading'+i[0]+'"></div>',stManager.add([jsc("web/podcast.js")],(function(){domReplaceEl(ge("podcast_loading"+i[0]),Podcast.drawSnippet(o.audio,o.coverUrl,_t))}),!0)}if(k=dt,(o.onSuccess||function(){})(),hide(domByClass(tt.menuNode,"_type_podcast")),!je&&!Ge){var pt=ge("official"),ut=pt&&gpeByClass("_submit_post_box",pt);if(pt&&ut)(Ne=domData(ut,"from-oid"))!==(ze=domData(ut,"oid"))&&(C=" attach_disabled")}break;case ke:if(vk.widget||h.pretty_cards||h[ke])return!1;var ht="",gt=Number(o.type);if(gt===u.GROUPS_CLASS_EVENT&&(ht=o.private?getTemplate("event_snippet_private_info"):""),!(w=getTemplate("event_snippet",extend({bottom:ht},o))))return(o.onError||function(){})(),!1;w='<div class="event_preview_title">'+(gt===u.GROUPS_CLASS_EVENT?(0,q.getLang)("events_media_type"):(0,q.getLang)("groups_media_type_community"))+"</div>"+w,k=st,(o.onSuccess||function(){})();break;case Ie:if(h.textlive)return!1;w=getTemplate("textlive_snippet",o);break;case Te:if(h.situational_theme)return!1;break;case Ce:w=this.getProductPreview(o)}if(Qe){var vt=We.chosenMedias,mt=p?g:vt.length,wt="";if(Je&&1===b)wt=!1;else if(a===X)wt=se('<div class="page_preview_'+a+"_wrap"+C+'" style="position: relative">'+w+'<div class="page_photos_count">'+i.split(",").length+"</div></div>");else if(a==ie&&et||a===ye||a===Me||a===Te)wt=!1;else{var ft=null;a===ne&&o.map_data&&(ft=te),wt=se('<div class="page_preview_'+(ft||a)+"_wrap"+C+(M?" page_preview_vk_mini_app":"")+'"'+(G.nocl?' style="cursor: default"':"")+y+'><div nosorthandle="1" class="page_media_x_wrap inl_bl" data-title="'+(0,q.getLang)("dont_attach")+'" aria-label="'+(0,q.getLang)("dont_attach")+'" role="button" onmouseover="showTitle(this)" '+`onclick="cur.addMedia[${We.lnkId}].unchooseMedia(${mt}, undefined, { source: 'close' }); return cancelEvent(event);"><div class="page_media_x" nosorthandle="1"></div></div>`+w+f+"</div>")}if(addClass(wt,b?"fl_l":"clear_fix"),void 0!==o.upload_ind&&re("upload"+o.upload_ind+"_progress_wrap"),G.toggleLnk&&!p){var bt=We.attachCount()+1<Xe;toggle(e,bt),G.onToggleBlock&&G.onToggleBlock(bt)}Je&&1===b?(addClass(k,"editable_thumbs_wrap"),k=domLC(k)&&hasClass(domLC(k),"editable_thumbs")?domLC(k):k.appendChild(ce("div",{id:"thumbs_edit"+at,className:"editable_thumbs"})),stManager.add(["thumbs_edit.css",jsc("web/thumbs_edit.js")],(()=>{if(vt[mt]&&(vt[mt].type===a||vt[mt].media!==i)){if(G.toggleLnk&&!p){var n=We.attachCount()+1<Xe;toggle(e,n),G.onToggleBlock&&G.onToggleBlock(n)}o.editable.remove=We.unchooseMedia.pbind(mt),show(domPN(k));var r=ThumbsEdit.convert(a,i,o.editable);domData(k,"te-inited")?p?ThumbsEdit.updateMedia(k,a,i,o):ThumbsEdit.addMedia(k,r):ThumbsEdit.init(k,[r],{width:G.teWidth,height:G.teHeight,nocl:G.nocl,force:!0,onMove:G.onAddMediaChange,onUpdate:G.onChangedSize,deferred:!0}),toggleClass(t,"media_preview_has_medias",We.hasVisibleRows()&&(hasClass(t,"reply_media_preview")||isVisible(e)||!hasClass("signed","disabled"))),G.onChangedSize&&G.onChangedSize()}}),!0)):((a==ie||a==ye||a===Me)&&et||a===Te||(show(k),p?k.replaceChild(wt,vt[g][2]):k.appendChild(wt)),a!==Ce&&Ze&&(k==nt?stManager.add([jsc("web/sorter.js")],(function(){var e=getXY(nt),t=getSize(nt),a=function(){nt.sorter?sorter.added(nt):k.childNodes.length>1&&sorter.init(nt,{onReorder:G.onAddMediaChange})};e[0]||e[1]||t[0]||t[1]?a():cur.sorterClbk=a,G.onChangedSize&&G.onChangedSize()}),!0):k==ot&&stManager.add([jsc("web/qsorter.js")],(function(){ot.qsorter?qsorter.added(ot):k.childNodes.length>1&&qsorter.init(ot,We.qsorterOpts()),G.onChangedSize&&G.onChangedSize()}),!0)),G.onChangedSize&&G.onChangedSize()),p?vt[g]=[a,i,wt,n,m,o]:vt.push([a,i,wt,n,m,o])}else{mt=0;if(a===ie?mt=1:"mark_as_ads"===a&&(mt=2),a==ie&&et||a===ye||a===Me||a===Te)wt=!1;else{var kt=(!1===b?"page_docs_preview":"page_pics_preview")+(mt?"":" post_thumbed_media");kt+=b?" fl_l":" clear_fix";var yt=null;a===ne&&o.map_data&&(yt=te),wt=se(`\n            <div class="${kt}">\n              <div class="${"page_preview_"+(yt||a)+"_wrap"} ${C}" ${(G.nocl?'style="cursor: default"':"")+y}>\n                ${w}\n                <div nosorthandle="1" class="page_media_x_wrap inl_bl" data-title="${(0,q.getLang)("dont_attach")}" aria-label="${(0,q.getLang)("dont_attach")}" role="button" onmouseover="showTitle(this)" onclick="cur.addMedia[${We.lnkId}].unchooseMedia(${mt}); return cancelEvent(event);">\n                  <div class="page_media_x" nosorthandle="1"></div>\n                </div>\n                ${f}\n              </div>\n            </div>`)}void 0!==o.upload_ind&&re("upload"+o.upload_ind+"_progress_wrap"),"postpone"!==a&&a!==Me&&"mark_as_ads"!==a&&a!==ye&&(We.chosenMedia=[a,i],We.chosenMedia[5]=o,We.chosenMediaData=o),We.singleAdded(wt,a)}a==ne?!o.title||n||o.url?o.video?(cur.shareShowImg=0,We.bigLink=!0,We.showExternalPreview()):We.showExternalPreview():(cur.shareShowImg=0,We.showPreview(!0),We.shareData.images=!1):a==fe?o.nopreview||(cur.shareShowImg=0,We.shareData=extend(We.shareData||{},o,{images:!1}),We.showPreview()):a===Y?We.pollCreate(o):a==ie?et?We.postponeInd=mt:We.setupPostpone(o,Ee):a==oe?We.markAsAds=1:a==de&&We.createPrettyCards(o),toggleClass(t,"media_preview_has_medias",We.hasVisibleRows()&&(isVisible(e)||!hasClass("signed","disabled"))),G.onChangedSize&&G.onChangedSize();var Ct=window.event;return Ct&&"click"==Ct.type&&(Ct.ctrlKey||Ct.metaKey||Ct.shiftKey)&&We.attachCount()+1<=Xe&&(r=!0),cur.fileApiUploadStarted&&void 0!==o.upload_ind||o.upload_new||cur.preventBoxHideWithSharedBox||cur.preventBoxHide||!0===r||inArray(a,[Y,"share","page","postpone","mark_as_ads","pretty_cards",ye,Ce])||boxQueue.hideLast(),cur.lastPostMsg=!1,G.onMediaAdd&&G.onMediaAdd({type:a,media:i,data:o,url:n}),getAudioPlayer().updateCurrentPlaying(),cur.onMediaChanged&&cur.onMediaChanged(We.chosenMedias),window.mvcur&&mvcur.onMediaChanged&&mvcur.onMediaChanged(),G.onMediaChanged&&G.onMediaChanged(),We.emitter&&We.emitter.emit(We.eventTypes.mediaUpdate),void 0!==o.upload_ind&&delete o.upload_ind,!1}function Mt(e,t){return isString(e)?e=clean((0,l.unclean)((0,l.unclean)(e))):(isObject(e)||isArray(e))&&(e=It(e,t)),e}function It(e,t){if(!vk.widget)return e;if((t=positive(t))>5)return e;if(isArray(e))e.forEach((function(a,i){e[i]=Mt(a,t+1)}));else if(isObject(e))for(var a in e)e.hasOwnProperty(a)&&(e[a]=Mt(e[a],t+1));return e}function Tt(e){var t=340,a=127;return"im"!==cur.module&&(t=Math.min(parseInt(e.parentElement.offsetWidth),510)||480,a=Math.min(t/2,200),(hasClass(e.parentElement,"reply_media_preview")||"wpe_media_preview"===e.parentElement.id)&&a>120&&(a=120)),{width:t,height:a}}},unchooseMedia:function(a,i){var o,n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=r.source,d=void 0===s?"manual":s,l=r.isReset,c=void 0!==l&&l,_=We.chosenMedias,p=null!=i?i:(null===(o=_[a])||void 0===o?void 0:o[0])?[null===(n=_[a])||void 0===n?void 0:n[0]]:[];if(We.onChange&&!1===We.onChange(!1,a,void 0,void 0))return!1;if(Qe){if(p.includes(Ce)||(cur.checkURLDomainRequest&&cur.checkURLDomainRequest.abort(),clearTimeout(cur.showLoaderTimeout),clearInterval(cur.shareImgInterval),clearTimeout(cur.shareImgInterval2),clearTimeout(cur.imgLoadTimeout),clearTimeout(cur.checkURLDomainTO)),void 0===a){if(window.ThumbsEdit&&ThumbsEdit.removeAll("thumbs_edit"+at),each(We.chosenMedias,(function(e,t){!t||void 0===e||i&&!inArray(t[0],i)||We.unchooseMedia(e,void 0,{source:d,isReset:c})})),We.urlsCancelled=[],G.onChangedSize){G.onChangedSize();var u=setInterval(G.onChangedSize,50);setTimeout(clearTimeout.bind(null,u),500)}return void(We.copyrightToggle&&We.copyrightToggle(!0))}if(_[a]){var h;switch(_[a][0]===ve&&(h=cur.editingPost&&!cur.editingPost[3].reply&&"wpe_media_preview"===gpeByClass("multi_media_preview",_[a][2]).id),_[a][2]?((x=geByClass1("page_media_x_wrap",_[a][2],"div"))&&x.tt&&x.tt.el&&x.tt.destroy(),domPN(_[a][2])==nt&&nt.sorter?(each(nt.sorter.elems,(function(){setStyle(this,{top:"auto",left:"auto",cursor:"auto"})})),nt.sorter.destroy(),re(_[a][2]),nt.childNodes.length>1&&sorter.init(nt,{onReorder:G.onAddMediaChange})):domPN(_[a][2])==ot&&ot.qsorter?(each(ot.qsorter.elems,(function(){setStyle(domFC(this),{top:"auto",left:"auto"}),setStyle(this,{cursor:"auto"})})),ot.qsorter.destroy(),re(_[a][2]),ot.childNodes.length>1&&qsorter.init(ot,We.qsorterOpts())):re(_[a][2])):_[a][0]!=Q&&_[a][0]!=J&&_[a][0]!=be||window.ThumbsEdit&&ThumbsEdit.removeById("thumbs_edit"+at,_[a][0]+_[a][1]),_[a][0]){case"page":case"share":We.shareData={},re(We.sharePreview),hide("medadd_c_linkimg_loader"),delete We.sharePreview,show(domByClass(tt.menuNode,"_type_share")),show(e),(g=ge("signed"))&&disable(g,!isChecked("official")),show(domByClass(tt.menuNode,"_type_market"));break;case"pretty_cards":var g;re(We.prettyCardGallery.el),delete We.prettyCardGallery,(g=ge("signed"))&&disable(g,!isChecked("official")),show(domByClass(tt.menuNode,"_type_pretty_cards")),show(e);break;case Y:re(We.pollPreview),delete We.pollPreview,show(domByClass(tt.menuNode,"_type_poll"));break;case"map":show(domByClass(tt.menuNode,"_type_map"));break;case ve:var v=!0;if(h)+cur.editingPost[0].split("_")[0]!==cur.oid&&(v=!1);else{var m=(b=ge("official"))&&gpeByClass("_submit_post_box",b);if(b&&m){var w=domData(m,"from-oid"),f=domData(m,"oid");w!==f&&(v=!1)}}toggle(domByClass(tt.menuNode,"_type_podcast"),v);break;case pe:show(e),show(domByClass(tt.menuNode,"_type_market")),show(domByClass(tt.menuNode,"_type_market_services"));break;case"wall":case"wall_reply":case me:case we:show(e);break;case"postpone":var b,k=geByClass1("medadd_c_timersett",We.postponePreview);cur.editingPost&&k&&!et?re(domFC(We.postponePreview)):(ct.innerHTML="",We.postponeDatepicker=null,We.postponeDate=null,We.postponeInd=null),We.postponePreview=!1,(b=ge("official"))&&disable(b,!1);var y=G.poster,C="";if(cur.editingPost)if(cur.editingPost[6]&&intval(cur.editingPost[6].getAttribute("data-suggest"))){C=(0,q.getLang)("wall_publish_suggest");var M=ge("wpe_save");M&&F.FlatButton.setLabel(M,C)}else{C=(0,q.getLang)("wall_publish_now");var I=ge("wpe_save");I&&F.FlatButton.setLabel(I,C)}else{C=(0,q.getLang)("wall_send");var T=ge("send_post");F.FlatButton.setLabel(T,C)}y&&y.changeBtnText(C),et?We.updatePostponeBtn(!0):show(domByClass(tt.menuNode,"_type_postpone"));break;case"mark_as_ads":show(domByClass(tt.menuNode,"_type_mark_as_ads")),We.markAsAds=!1;break;case ye:We.copyrightRemove()}_[a]=!1}if(G.toggleLnk){v=We.attachCount()<Xe;toggle(e,v),G.onToggleBlock&&G.onToggleBlock(v)}p.includes(Ce)||(toggle(it,!!(Je?geByClass1("thumb_wrap",it):domFC(it))),toggle(ot,!!domFC(ot)),toggle(rt,!!domFC(rt)),toggle(st,!!domFC(st)),toggle(dt,!!domFC(dt)),toggle(lt,!!domFC(lt))),toggle(nt,!!domFC(nt)),et||toggle(ct,!!domFC(ct)),toggle(_t,!!domFC(_t))}else{var A,x;if(null==a&&(a=0),(x=geByClass("page_media_x_wrap",t,"div")[a])&&x.tt&&x.tt.el&&x.tt.destroy(),1==a){if(et)ct.innerHTML="",We.postponeDatepicker=null,We.postponeDate=null,We.updatePostponeBtn(!0);else if(We.postponePreview){show(geByClass1("add_media_type_"+at+"_postpone",tt.menuNode,"a"));var D=domPN(We.postponePreview);window.tooltips&&tooltips.destroyAll(D),re(D),We.postponePreview=!1;var P=tt.lastTypes;each(tt.types,(function(e,t){"postpone"===t[0]&&P.push(t)})),tt.setItems(P)}}else if(2==a&&We.markAsAds){We.markAsAds=!1;var S=geByClass1("page_preview_mark_as_ads_wrap",t);window.tooltips&&S&&tooltips.destroyAll(S),re(S);P=tt.lastTypes;each(tt.types,(function(e,t){"mark_as_ads"===t[0]&&P.push(t)})),tt.setItems(P)}else if(3===a)We.copyrightRemove();else{if(We.postponePreview||We.markAsAds){D=We.postponePreview&&domPN(We.postponePreview),S=We.markAsAds&&domPN(geByClass1("page_preview_mark_as_ads_wrap",t));for(var B=[],$=0;$<t.childNodes.length;$++){var E=t.childNodes[$];"DIV"==E.nodeName&&E!=D&&E!=S&&B.push(E)}each(B,(function(e,t){re(t)}));P=[];each(tt.types,(function(e,t){"postpone"===t[0]&&We.postponePreview||"mark_as_ads"===t[0]&&We.markAsAds||P.push(t)})),tt.setItems(P)}else val(t,""),addClass(t,"med_no_attach"),tt.setItems(tt.types);We.chosenMedia&&(We.chosenMedia=!1,We.chosenMediaData=!1),(A=We.shareData)&&(A.url&&We.urlsCancelled.push(A.url),A.initialPattern&&We.urlsCancelled.push(A.initialPattern),We.shareData={}),each([We.sharePreview,We.pollPreview],(function(){re(this)})),We.sharePreview=We.pollPreview=!1}G.toggleLnk&&show(e)}if(st&&st.classList.remove("vk_mini_app_preview"),toggleClass(t,"media_preview_has_medias",We.hasVisibleRows()&&(hasClass(t,"reply_media_preview")||isVisible(e)||!hasClass("signed","disabled"))),We.copyrightToggle&&We.copyrightToggle(!0),cur.onMediaChanged&&cur.onMediaChanged(_),window.mvcur&&mvcur.onMediaChanged&&mvcur.onMediaChanged(),G.onMediaChanged&&G.onMediaChanged(),G.onMediaRemove&&G.onMediaRemove({removedTypes:p,source:d,isReset:c}),We.emitter&&We.emitter.emit(We.eventTypes.mediaUpdate),cur.lastPostMsg=!1,We.onChange&&We.onChange(!1),G.onChangedSize){G.onChangedSize();u=setInterval(G.onChangedSize,50);setTimeout(clearTimeout.bind(null,u),500)}},findChosenMedia:e=>We.chosenMedias.find((t=>t&&t[0]===e)),findChosenMediaAllIndices:e=>(0,h.findAllIndices)(We.chosenMedias,(t=>t[0]===e)),chosenMediaToObject(e){var t=W(e,6);return{type:t[0],media:t[1],data:t[5]}},unchooseMediaForType(e){We.findChosenMediaAllIndices(e).forEach((e=>{We.unchooseMedia(e)}))},unchooseMediaByTypeAndId(e,t){var a=We.chosenMedias.findIndex((a=>{if(!a)return!1;var i=W(a,2),o=i[0],n=i[1];return e===o&&t===n}));a>-1&&this.unchooseMedia(a)},singleAdded:function(a,i){if(i!==ye){if(i===ie){if(et)return;t.appendChild(a)}else if("mark_as_ads"===i)We.postponePreview?t.insertBefore(a,domLC(t)):t.appendChild(a);else{if(i===Me||i===Te)return;domFC(t)?t.insertBefore(a,domFC(t)):t.appendChild(a)}removeClass(t,"med_no_attach");var o=[];each(tt.lastTypes,(function(e,t){("postpone"!==t[0]||!We.postponePreview&&"postpone"!==i)&&("mark_as_ads"!==t[0]||!We.markAsAds&&"mark_as_ads"!==i)&&(inArray(i,["postpone","mark_as_ads"])||inArray(t[0],["postpone","mark_as_ads"]))&&o.push(t)})),tt.setItems(o),G.toggleLnk&&!o.length&&hide(e)}},getMedias:function(e){if(Qe){var t=window.ThumbsEdit?ThumbsEdit.getMedias("thumbs_edit"+at):[],a={},i=We.chosenMedias||[],o=[],n=function(e,t,i){if(i[0]+i[1]==e)return o.push(i),a[e]=!0,!1};return each(t,(function(e,t){each(i,n.pbind(t[0]+t[1]))})),each(ot.childNodes,(function(e,t){var a=(t.id||"").match(/^pam\d+_([a-z]+)(-?\d+_\d+)/);a&&each(i,n.pbind(a[1]+a[2]))})),each(nt.childNodes,(function(e,t){var a=(t.id||"").match(/^pam\d+_([a-z]+)(-?\d+_\d+)/);a&&each(i,n.pbind(a[1]+a[2]))})),each(i,(function(e,t){t&&isArray(t)&&t.length&&!a[t[0]+t[1]]&&o.push(t)})),o}return(i=We.chosenMedia)?[e?i:i[0]+i[1]]:[]},showPhoto:function(e){function t(t,a,i,o){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t,a,i){for(var o in!cur.pvData||cur.pvShown&&cur.pvListId==t||delete cur.pvData[t],ajaxCache)o.toString().match(/^\/al_photos\.php\#act=show&draft_photos/)&&delete ajaxCache[o];var n=We.getMedias(),r=[];return each(n,(function(e,t){t&&"photo"==t[0]&&r.push(t[1]+"/"+(We.phLists[t[1]]||""))})),a.additional={},a.additional.open_pe=intval(cur.openEditor),cur.openEditor||(a.additional.draft_photos=r.join(";")),delete cur.openEditor,showPhoto(e,t,extend(a,{queue:1}),i)})),showMediaProgress:function(t,a,i,o){if(We.onProgress&&!1===We.onProgress(t,a,i))return!1;var n=i.loaded/i.total,r=intval(100*n),s=(i.fileName||i.name||"").replace(/[&<>"']/g,""),d=s?a+"_"+s:a,l=s?s.length>33?s.substr(0,30)+"...":s:"",c=ge("upload"+d+"_progress");if(c){show(c);v=geByClass1("ui_progress_bar",c);setStyle(v,{width:r+"%"})}else{var _=o?`window.__upload_callback['${d}'] && window.__upload_callback['${d}']()`:`Upload.terminateUpload(${a}, '${s||a}', this);`,p=`<div\n            class="progress_x fl_l"\n            onmouseover="animate(this, {opacity: 1}, 200);showTooltip(this, {text: '${(0,q.getLang)("dont_attach")}', shift: [16, 8, 8], black: 1})"\n            onmouseout="animate(this, {opacity: 0.6}, 200);"\n            onclick="${_}" />`;cur.attachMediaIndexes||(cur.attachMediaIndexes={}),cur.attachMediaIndexes[d]=at;var u=`\n          <div class="fl_l">\n            <div class="page_attach_progress_wrap" style="margin-top: 3px; margin-bottom: 4px;">\n              <div id="upload${d}_progress" class="page_attach_progress ui_progress">\n                <div class="ui_progress_back"></div>\n                <div class="ui_progress_bar"></div>\n              </div>\n            </div>\n          </div>\n          ${l?'<div class="attach_label fl_l">'+l+"</div>":""}\n          ${p}\n          `;if(Qe){if(_t.appendChild(ce("div",{id:"upload"+d+"_progress_wrap",innerHTML:u,className:"clear_fix upload_"+a+"_progress"},{marginTop:"6px"})),show(_t),G.toggleLnk){var h=We.attachCount()<Xe;toggle(e,h),G.onToggleBlock&&G.onToggleBlock(h)}}else{var g=ce("div",{id:"upload"+d+"_progress_wrap",innerHTML:u,className:"clear_fix upload_"+a+"_progress"});We.chosenMedia="progress",We.singleAdded(g,"progress")}G.onChangedSize&&G.onChangedSize(),c=ge("upload"+d+"_progress");var v=geByClass1("ui_progress_bar",c);r?setStyle(v,{width:r+"%"}):(setStyle(v,{width:"1px"}),hide(c))}},hasVisibleRows:function(){var e=!1;return each(geByClass("media_preview",t),(function(){if(isVisible(this))return e=!0,!1})),e},attachCount:function(){if(We.attachedCount)return We.attachedCount();if(!t)return 0;if(!Qe)return t.childNodes.length-(We.postponePreview?1:0)-(We.markAsAds?1:0);var e=(Je&&window.ThumbsEdit?(ThumbsEdit.cache()["thumbs_edit"+at]||{}).previews||[]:it.childNodes).length+ot.childNodes.length+lt.childNodes.length+nt.childNodes.length/(nt.sorter?2:1)+_t.childNodes.length;return We.sharePreview&&++e,We.pollPreview&&++e,e},onMediaTypesInit(){var e={actionsEl:je,addMedia:We,onMediaChange:G.onMediaChange};We.types.forEach((t=>{var a=t[3],i=a&&a.onMediaTypeInit;i&&i(e)}))},getProductPreview:function(e){var t=(0,D.getIcon56CameraOffOutline)().icon,a="",i="",o="MedaddProduct__img",n="";return e.price&&(a=`\n          <div class="MedaddProduct__price">\n            ${e.price/100} &#8381;\n          </div>\n        `),e.description&&(i=`\n          <div class="MedaddProduct__description">\n            ${e.description}\n          </div>\n        `),e.img?n=`style="background-image: url(${e.img});"`:o+=" MedaddProduct__img--empty",`\n        <div class="MedaddProduct">\n          <div class="MedaddProduct__widgetTitle">\n            ${(0,q.getLang)("classifieds_post_edit_product_snippet_title")}\n          </div>\n          <div class="MedaddProduct__widget">\n            <div class="${o}" ${n}>\n              <div class="MedaddProduct__imgIcon">\n                ${t}\n              </div>\n            </div>\n            <div class="MedaddProduct__widgetRight">\n              <div class="MedaddProduct__title">\n                ${e.title}\n              </div>\n              ${a}\n              ${i}\n            </div>\n          </div>\n        </div>\n      `},pollCreate:function(e){var t=e.poll_html;if(cur.addMedia[at].pollInputData=e,rt)if(t){var a=`<div class="medadd_c" id="poll_dummy${at}">${t}</div>`;We.pollPreview=rt.appendChild(domFC(cf(a)))}else stManager.add(["ui_controls.css","ui_controls.js","datepicker.css",window.jsc("web/datepicker.js")],(()=>{var t=e.poll_question_length,a=e.question,i=e.lang,o=e[Pe],n=e.answers,r=e[Ee],s=e[Le],d=e[Oe],c=e[Ne],_=e[ze],p=e[Ue],u=e.poll_is_board,h=e.poll_is_edit,g=e.poll_is_not_posted,v=e.poll_backgrounds,m=e.poll_answers_limit||10,w=e.poll_no_animate_opening||e.question,f=e[Re],b=`\n          <div class="medadd_h medadd_h_poll inl_bl">\n            ${i.question}\n            <span class="medadd_poll_question_warning"></span>\n          </div>\n          <input onkeydown="cur.addMedia[%lnkid%].pollKeydown(this, event)" oninput="cur.addMedia[%lnkid%].pollChangeQuestion(this)" maxlength="${t}" onkeyup="cur.addMedia[%lnkid%].pollKeyup(this, event)" class="text dark medadd_poll_question${u&&h?" disabled":""}"${u&&h?' readonly="readonly"':""} id="create_poll_question%lnkid%" value="%question%" />\n          <div class="medadd_h">${i.answers}</div>\n          <div class="medadd_poll_answers" id="create_poll_answers%lnkid%">\n            %answers%\n          </div>\n          ${u&&h?"":`<div class="medadd_poll_answer_add_wrap" id="create_poll_add%lnkid%">\n            <div class="medadd_poll_answer_add fakeinput dark" onclick="cur.addMedia[%lnkid%].pollAnswerAdd()">${i.answer_add}</div>\n          </div>`}\n          %backgrounds%\n          %settings%\n          <div class="checkbox medadd_datepicker_checkbox medadd_poll_cb%classuntil%" id="create_poll_until%lnkid%" onclick="checkbox(this);cur.addMedia[%lnkid%].pollChanged();">${i.until}</div>\n          <div class="medadd_datepicker">\n            <input type="text" class="medadd_datepicker_date dark" id="create_poll_untildate%lnkid%"/><div class="medadd_datepicker_at datepicker_at">${i.at}</div><input type="text" class="medadd_datepicker_time dark" id="create_poll_untiltime%lnkid%"/>\n          </div>\n          ${u?`\n          <div class="checkbox medadd_poll_cb%classonmain%" id="create_poll_onmain%lnkid%" onclick="checkbox(this);cur.addMedia[%lnkid%].pollChanged();">${i.add_to_main}</div>\n          `:""}\n          ${u&&h?`\n          <div class="checkbox medadd_poll_cb%classclosed%" id="create_poll_closed%lnkid%" onclick="checkbox(this);cur.addMedia[%lnkid%].pollChanged();">${i.close}</div>\n          `:""}\n        `,k=`\n          <div class="medadd_h">${i.settings}</div>\n          ${h&&!g||u?"":`<div class="checkbox medadd_poll_cb%classanon%" id="create_poll_anonymous%lnkid%" onclick="checkbox(this);cur.addMedia[%lnkid%].pollChanged();">${i.anonymous}</div>`}\n          ${h?"":`<div class="checkbox medadd_poll_cb%classmulty%" id="create_poll_multy%lnkid%" onclick="checkbox(this);cur.addMedia[%lnkid%].pollChanged();">${i.multy}</div>`}\n          ${h?"":`<div class="checkbox medadd_poll_cb%classdisableunvote%" id="create_poll_disable_unvote%lnkid%" onclick="checkbox(this);cur.addMedia[%lnkid%].pollChanged();">${i.disable_unvote}</div>`}\n        `,y=`\n          <div class="medadd_poll_answer_wrap">\n            <input onkeydown="cur.addMedia[%lnkid%].pollKeydown(this, event)" onkeyup="cur.addMedia[%lnkid%].pollKeyup(this, event)" class="text dark medadd_poll_answer${u&&h?" disabled":""}"${u&&h?' readonly="readonly"':""} %attrs%/>\n            <div class="page_media_x_wrap medadd_poll_answer_remove" data-title="${i.answer_remove}" aria-label="${i.answer_remove}" role="button" onmouseover="showTitle(this)" onclick="cur.addMedia[%lnkid%].pollAnswerRemove(this)">\n              <div class="page_media_x"></div>\n            </div>\n          </div>\n        `,C=`\n          <div class="medadd_h">${i.background}</div>\n          <div class="medadd_poll_backgrounds_wrap" id="create_poll_backgrounds_wrap%lnkid%">\n            <div class="medadd_poll_backgrounds_arrow_prev" onclick="cur.addMedia[%lnkid%].pollBackgroundsPaging('prev')"></div>\n            <div class="medadd_poll_backgrounds_arrow_next" onclick="cur.addMedia[%lnkid%].pollBackgroundsPaging('next')"></div>\n            <div class="medadd_poll_backgrounds" id="create_poll_backgrounds%lnkid%">\n              %backgrounds%\n            </div>\n          </div>\n        `;cur.addMedia[at].answersLimit=m,cur.addMedia[at].tplAnswer=y;var M="";u||(M+=cur.addMedia[at].pollBackgroundGetHtml(),v&&v.forEach((e=>{M+=cur.addMedia[at].pollBackgroundGetHtml(e)})),M+=rs('\n          <div class="medadd_poll_background medadd_poll_background_uploader" onclick="cur.addMedia[%lnkid%].pollBackgroundUpload(this);">\n            <div class="medadd_poll_background_preview"></div>\n          </div>\n        ',{lnkid:at}),M=rs(C,{lnkid:at,backgrounds:M}));var I="";if(!n||isArray(n)&&!n.length){var T=[];for(var A in e)if(e.hasOwnProperty(A)){var x=Se.length+1;if("answers["===A.substr(0,x)){var D=intval(A.slice(x,-1));T.push([D,e[A]])}}T.length?(n=[],T.sort(((e,t)=>e[0]<0&&t[0]<0?e[0]<t[0]:e[0]>=0&&t[0]>=0?e[0]>t[0]:t[0]<0)).forEach((e=>{n.push([e[0]<0?e[0]:0,e[1]])}))):n=[[0,""],[0,""]]}n.forEach(((e,t)=>{var a=W(e,2),i=a[0],o=a[1];I+=rs(y,{attrs:(i?` id="create_poll_ans${i}"`:"")+(o?` value="${clean((0,l.unclean)(o))}"`:""),lnkid:at})})),We.pollPreview=rt.appendChild(ce("div",{className:"medadd_c medadd_poll",innerHTML:rs(b,{lnkid:at,question:a?clean((0,l.unclean)(a)):"",classuntil:_?" on":"",settings:rs(k,{lnkid:at,classanon:o?" on":"",classmulty:p?" on":"",classdisableunvote:f?" on":""}),backgrounds:M,answers:I,classonmain:r?" on":"",classclosed:s?" on":""})})),n.length==m&&hide(`create_poll_add${at}`);var P=`create_poll_untildate${at}`,S=new Datepicker(P,{time:`create_poll_untiltime${at}`,width:157,noPast:!0,activePeriod:De,minStep:1,date:_||Math.round(((new Date).getTime()+864e5)/Ae),onUpdate:()=>{var e=new Date,t=new Date(1e3*positive(val(P)));t.getTime()>=e.getTime()+De&&(S.timePicker.hourDD.val(e.getHours()),t.getMinutes()>e.getMinutes()&&S.timePicker.minDD.val(e.getMinutes()),S.setDate(t.getFullYear(),t.getMonth()+1,t.getDate(),!0,e.getHours(),e.getMinutes())),cur.addMedia[at].pollChanged()}});if(cur.addMedia[at].pollBackgroundsPos=0,cur.addMedia[at].pollBackgroundSelect(c?-c:intval(d)),cur.addMedia[at].pollChangeQuestion(ge(`create_poll_question${at}`)),w)elfocus(`create_poll_question${at}`),G.onChangedSize&&G.onChangedSize(),cur.addMedia[at].pollUpdateArrows();else{We.pollPreview.style.position="absolute",We.pollPreview.style.visibility="hidden";var B=We.pollPreview.offsetHeight;We.pollPreview.style.height=0,We.pollPreview.style.position="",We.pollPreview.style.visibility="",animate(We.pollPreview,{height:B},G.mail?0:200,(()=>{We.pollPreview.style.height="",elfocus(`create_poll_question${at}`),G.onChangedSize&&G.onChangedSize(),cur.addMedia[at].pollUpdateArrows()}))}var $=ge(`create_poll_backgrounds_wrap${at}`);function E(){addEvent($,browserFeatures.wheelEvent,cur.addMedia[at].pollMouseWheel)}function L(){removeEvent($,browserFeatures.wheelEvent,cur.addMedia[at].pollMouseWheel)}addEvent($,"mouseenter",E),addEvent($,"mouseleave",L),cur.destroy.push((function(){removeEvent($,browserFeatures.wheelEvent,cur.addMedia[at].pollMouseWheel),removeEvent($,"mouseenter",E),removeEvent($,"mouseleave",L)}))}))},pollMouseWheel:function(e){cancelEvent(e);var t=Math.abs(e.deltaY)>Math.abs(e.deltaX)?e.deltaY:e.deltaX;cur.addMedia[at].pollBackgroundsPaging(t,!0)},pollBackgroundsPaging:function(e,t){var a=ge(`create_poll_backgrounds_wrap${at}`),i=ge(`create_poll_backgrounds${at}`),o=a.offsetWidth,n=cur.addMedia[at].pollBackgroundsPos;isNumeric(e)?n+=e:"next"===e?n+=o:n-=o,cur.addMedia[at].pollBackgroundsPos=Math.max(0,Math.min(n,i.scrollWidth-o)),t?removeClass(i,"animated"):addClass(i,"animated"),setStyle(i,"transform","translateX("+cur.addMedia[at].pollBackgroundsPos*(vk.rtl?1:-1)+"px)"),cur.addMedia[at].pollUpdateArrows()},pollUpdateArrows:function(){var e=ge(`create_poll_backgrounds_wrap${at}`),t=ge(`create_poll_backgrounds${at}`);if(e){var a=e.offsetWidth,i=t.scrollWidth-a;toggleClass(e,"medadd_poll_backgrounds_arrow_prev_disabled",0===cur.addMedia[at].pollBackgroundsPos),toggleClass(e,"medadd_poll_backgrounds_arrow_next_disabled",cur.addMedia[at].pollBackgroundsPos===i||i<=0)}},pollUntilGet:function(){var e=isChecked(`create_poll_until${at}`)?positive(val(`create_poll_untildate${at}`)):0;return Math.min(e,(new Date).getTime()+De)},pollBackgroundChange:function(e,t){var a=gpeByClass("medadd_poll_backgrounds",e),i=geByClass1("medadd_poll_background_radio",e);geByClass("medadd_poll_background_radio",a).forEach((e=>{checkbox(e,e===i)})),cur.addMedia[at].pollChanged()},pollAnswerAdd:function(){var e=ge("create_poll_answers"+at),t=geByClass("medadd_poll_answer_wrap",e).length,a=cur.addMedia[at].answersLimit;if(t<a){var i=cf(rs(cur.addMedia[at].tplAnswer,{lnkid:at}));e.appendChild(i);var o=geByClass("medadd_poll_answer",e).pop();elfocus(o)}G.onChangedSize&&G.onChangedSize(),toggle("create_poll_add"+at,t<a-1)},pollAnswerRemove:function(e){e.tt&&e.tt.el&&e.tt.destroy(),re(domPN(e)),G.onChangedSize&&G.onChangedSize(),cur.addMedia[at].pollChanged(),show("create_poll_add"+at)},pollKeydown:function(e,t){if((t=t||window.event)&&(10==t.keyCode||t.keyCode==KEY.ENTER||t.keyCode==KEY.TAB)){var a=hasClass(e,"medadd_poll_question"),i=t.shiftKey;if(a&&i)return;var o=a?domFC(domNS(domNS(e))):(i?domPS:domNS)(domPN(e));return o?elfocus(geByTag1("input",o)):i?elfocus(geByClass1("medadd_poll_question",domPN(domPN(domPN(e))))):this.pollAnswerAdd(),cancelEvent(t)}},pollKeyup:function(e,t){(!(t=t||window.event)||10!=t.keyCode&&t.keyCode!=KEY.ENTER&&t.keyCode!=KEY.TAB)&&(cur.addMedia[at].pollChangedTimeout&&clearTimeout(cur.addMedia[at].pollChangedTimeout),cur.addMedia[at].pollChangedTimeout=setTimeout((()=>cur.addMedia[at].pollChanged()),100))},pollBackgroundGetHtml:function(e){var t="",a=W(e||[0],1)[0];if(a<0){var i=W(e,5),o=i[1],n=i[2],r=i[3],s=i[4];t=`\n          <div class="medadd_poll_background" onclick="cur.addMedia[${at}].pollBackgroundChange(this);">\n            <div class="medadd_poll_background_preview">\n              <div class="medadd_poll_background_preview_lines1"></div>\n              <div class="medadd_poll_background_preview_lines2"></div>\n              <div class="medadd_poll_background_photo" style="background: rgb(${n}, ${r}, ${s});">\n                <div class="medadd_poll_background_photo_holder">\n                  <div class="medadd_poll_background_photo_gradient" style="background: linear-gradient(0, rgba(${n}, ${r}, ${s}, 1) 0, rgba(${n}, ${r}, ${s}, 0) 50%)"></div>\n                  <img src="${o}" class="medadd_poll_background_photo_img"/>\n                </div>\n              </div>\n            </div>\n            <div class="medadd_poll_background_radio radiobtn" data-id="${a}" data-photo-r="${n}" data-photo-g="${r}" data-photo-b="${s}" data-photo-url="${o}"></div>\n          </div>\n        `}else{var d="",l="";if(a){var c=W(e,2)[1];if("gradient"===c){var _=W(e,4),p=_[2],u=_[3],h=[];u.forEach((e=>{var t=W(e,2),a=t[0],i=t[1];h.push(`#${i} ${Math.round(100*a)}%`)})),d=`background: linear-gradient(${p-90}deg, ${h.join(",")});"`}else if("tile"===c){var g=W(e,5),v=g[2],m=g[3];d=`background: url(${g[4]}) top center;background-size: ${v}px ${m}px;"`}}else l=" medadd_poll_background_default";t=`\n          <div class="medadd_poll_background${l}" onclick="cur.addMedia[${at}].pollBackgroundChange(this);">\n            <div class="medadd_poll_background_preview"${d?` style="${d}"`:""}>\n              <div class="medadd_poll_background_preview_lines1"></div>\n              <div class="medadd_poll_background_preview_lines2"></div>\n            </div>\n            <div class="medadd_poll_background_radio radiobtn" data-id="${a}"></div>\n          </div>\n        `}return t},pollBackgroundAdd:function(e){var t=ge("create_poll_backgrounds"+at),a=geByClass1("medadd_poll_background_uploader",t),i=cf(cur.addMedia[at].pollBackgroundGetHtml(e));i=domFC(i),t.insertBefore(i,a)},pollBackgroundSelect:function(e){var t=ge("create_poll_backgrounds"+at);if(t){var a=domQuery1(`.radiobtn[data-id="${e}"]`,t)||domQuery1('.radiobtn[data-id="0"]',t);if(a){var i=domPN(a);cur.addMedia[at].pollBackgroundsPos=(i.offsetLeft-t.offsetWidth/2+i.offsetWidth/2)*(vk.rtl?-1:1),cur.addMedia[at].pollBackgroundsPaging(0,!0),cur.addMedia[at].pollBackgroundChange(i)}}},pollBackgroundGet:function(){var e=domQuery1(`#create_poll_backgrounds${at} .radiobtn.on`);return intval(domData(e,"id"))},pollBackgroundUploaded:function(e,t,a){var i=-intval(e);cur.addMedia[at].pollBackgroundAdd([i,clean(t),intval(a.r),intval(a.g),intval(a.b)]),cur.addMedia[at].pollBackgroundSelect(i)},pollBackgroundUpload:function(){var e=cur.addMedia[at].pollInputData;(0,n.showBox)("al_page.php",{act:"owner_photo_box",oid:e&&e.poll_owner_id||(G.mail?cur.gid?-cur.gid:vk.id:cur.oid||vk.id),lnk_id:at,is_voting:1},{stat:["owner_photo.css",jsc("web/owner_photo.js")]})},pollChanged:function(){G.onMediaChange&&G.onMediaChange()},pollBackgroundsGet:function(){var e=cur.addMedia[at].pollInputData,t=[];e&&e.poll_backgrounds&&e.poll_backgrounds.forEach((e=>{W(e,1)[0]>0&&t.push(e)}));var a=ge("create_poll_backgrounds"+at);return geByClass("radiobtn",a).forEach((function(e){var a=intval(domData(e,"id"));a&&a<0&&t.push([a,domData(e,"photo-url"),intval(domData(e,"photo-r")),intval(domData(e,"photo-g")),intval(domData(e,"photo-b"))])})),t},pollData:function(e,t){var a=cur.addMedia[at],i={};if(a&&ge("create_poll_question"+at)){for(var n=ge("create_poll_answers"+at),r=!1,s=0,d=domFC(n);d;d=domNS(d)){var l=trim(val(domFC(d)));if(l){var c=-intval((domFC(d).id.match(/^create_poll_ans(\d+)$/)||[0,-s++])[1]);i[`answers[${c}]`]=l,r=!0}}if(!r)return domFC(n)||a.pollAnswerAdd(),!0!==e&&(0,o.notaBene)(domFC(domFC(n))),!1;var _=trim(val("create_poll_question"+at));if(!_)return!0!==e&&(0,o.notaBene)("create_poll_question"+at),!1;i.question=_,i[ze]=a.pollUntilGet();var p=a.pollBackgroundGet();if(p<0?(i[Ne]=-p,i[Oe]=0):p>=0&&(i[Ne]=0,i[Oe]=p),i[Pe]=isChecked("create_poll_anonymous"+at)?1:0,i[Ee]=isChecked("create_poll_onmain"+at)?1:0,i[Le]=isChecked("create_poll_closed"+at)?1:0,i[Ue]=isChecked("create_poll_multy"+at)?1:0,i[Re]=isChecked("create_poll_disable_unvote"+at)?1:0,a.pollInputData&&t){i.poll_backgrounds=a.pollBackgroundsGet();var u=[Ve,He,$e,Fe];G.mail&&u.push(Be),u.forEach((e=>{a.pollInputData[e]&&(i[e]=a.pollInputData[e])})),G.mail&&(i.poll_is_edited=0,i["answers[0]"]||i.question!=a.pollInputData.question?i.poll_is_edited=1:[Pe,Ee,Le,Ue,ze,Ne,Oe,Re].forEach((e=>{intval(i[e])!==intval(a.pollInputData[e])&&(i.poll_is_edited=1)})),i.poll_is_edited||a.pollInputData.answers.forEach((e=>{var t=W(e,2),a=t[0],o=t[1];void 0!==i[`answers[${-a}]`]&&i[`answers[${-a}]`]==o||(i.poll_is_edited=1)})))}}else a&&ge("poll_dummy"+at)&&a.pollInputData&&a.pollInputData.poll_id&&(i.poll_id=a.pollInputData.poll_id);return i},pollChangeQuestion:function(e){var t=cur.addMedia[at].pollInputData,a=t.poll_question_length-e.value.length,i=geByClass1("medadd_poll_question_warning");i.innerHTML=a<=20?langNumeric(a,t.lang.question_length):""},markAsAdsInit(){var e=this.markAsAdsGetCheckboxEl();e&&attr(e,"onclick",`cur.addMedia[${this.lnkId}].markAsAdsChanged();`)},markAsAdsGetCheckboxEl:()=>!!xe&&xe.querySelector(".Post__markAsAdsButton"),markAsAdsData(e){var t=!!e&&{},a=this.markAsAds||isChecked(this.markAsAdsGetCheckboxEl());return!a&&this.chosenMedias&&(a=this.chosenMedias.some((e=>{if(isArray(e)&&W(e,1)[0]===oe)return!0}))),(a||e)&&(t={mark_as_ads:a?1:0}),t},markAsAdsChanged(){var e=this.markAsAdsGetCheckboxEl();if(e&&!hasClass(e,"disabled")){checkbox(e),Wall&&Wall.togglePostMarkAsAds(e,e.dataset.muteId);var t=this.markAsAdsData(!0).mark_as_ads;We.copyrightToggle&&We.copyrightToggle(!t),We.donutUpdateVisibility(),G.onMediaChange&&G.onMediaChange()}},copyrightInit(){var e=this.copyrightGetBtnEl();e&&attr(e,"onclick",`cur.addMedia[${this.lnkId}].copyrightShowBox();`),this.markAsAdsData(!0).mark_as_ads&&this.copyrightToggle(!1)},copyrightToggle(e){var t=document.querySelector(`#post_copyright_btn${this.lnkId}`);toggle(t,e);var a=this.copyrightGetBtnEl();if(a){var i=a.querySelector(".Post__copyrightButtonIcon"),o=a.querySelector(".Post__copyrightButtonText");if(e){if(this.copyrightData(!0).copyright){var n=(0,w.getIcon20WriteOutline)().icon;i.innerHTML=n,o.innerHTML=(0,q.getLang)("wall_post_copyright_edit_button")}else{var r=(0,B.getIcon20Add)().icon;i.innerHTML=r,o.innerHTML=(0,q.getLang)("wall_post_copyright_add_button")}a.classList.remove("Post__copyrightButton--disabled")}else{a.classList.add("Post__copyrightButton--disabled");var s=(0,B.getIcon20Add)().icon;i.innerHTML=s,o.innerHTML=(0,q.getLang)("wall_post_copyright_add_button")}}},copyrightGetBtnEl:()=>!!xe&&xe.querySelector(".Post__copyrightButton"),copyrightCreate(e){if(this.copyrightInputData=e,je&&e&&e.copyright){var t=`post_copyright_btn${this.lnkId}`,a=document.querySelector(`#${t}`);if(!a){var i=(0,q.getLang)("wall_post_copyright_source_text"),o=(0,$.getIcon12Dropdown)().icon;a=cf(`<div class="post_action_btn on" id="${t}" onclick="cur.addMedia[${this.lnkId}].copyrightShowBox();">\n              <div class="post_action_btn_layout">\n                <span class="post_action_btn_text" role="button" aria-label="${replaceEntities(i)}">${i}</span>\n                <span class="post_action_image_btn" role="button">${o}</span>\n              </div>\n             </div>`),je.appendChild(a)}}this.copyrightChanged()},copyrightRemove(){var e=document.querySelector(`#post_copyright_btn${this.lnkId}`);e&&e.parentNode.removeChild(e),this.copyrightInputData&&(this.copyrightInputData.copyright=""),this.copyrightChanged()},copyrightUnchoose(){this.chosenMedias&&this.chosenMedias.forEach(((e,t)=>{isArray(e)&&e[0]===ye&&this.unchooseMedia(t)})),this.multi||this.copyrightRemove()},copyrightBoxAccept(e){var t=e.btns.ok[0],a=document.querySelector(".PostCopyrightBox__input"),i=document.querySelector(".PostCopyrightBox__error");if(hide(i),!(0,o.isButtonLocked)(t)){var n=val(a);if(!n)return(0,o.notaBene)(a);ajax.post("al_wall.php",{act:"copyright_check_link",link:n},{onDone:()=>{this.copyrightInputData||(this.copyrightInputData={}),this.copyrightInputData.copyright=n,this.chooseMedia(ye,"",this.copyrightInputData),e.hide()},onFail:e=>(val(i,e),show(i),!0),showProgress:()=>(0,o.lockButton)(t),hideProgress:()=>(0,o.unlockButton)(t)})}},copyrightBoxDecline(e,t){t&&this.copyrightUnchoose(),e.hide()},copyrightShowBox(){(0,n.showBox)("al_wall.php",{act:"copyright_box"},{cache:!0,onDone:e=>{cur.postCopyrightFeatureTT&&cur.postCopyrightFeatureTT.hide();var t=this.copyrightData(!0);e.removeButtons(),t.copyright?(e.setOptions({width:400,title:(0,q.getLang)("wall_post_copyright_mb_title_text_edit")}),e.setButtons((0,q.getLang)("wall_post_copyright_edit_button"),(()=>this.copyrightBoxAccept(e)),(0,q.getLang)("global_cancel"),(()=>this.copyrightBoxDecline(e))),e.setControlsText(`<a onclick="cur.addMedia[${this.lnkId}].copyrightBoxDecline(curBox(), true);">${(0,q.getLang)("global_delete")}</a>`)):(e.setOptions({width:400,title:(0,q.getLang)("wall_post_copyright_mb_title_text")}),e.setButtons((0,q.getLang)("wall_post_copyright_add_button"),(()=>this.copyrightBoxAccept(e)),(0,q.getLang)("global_cancel"),(()=>this.copyrightBoxDecline(e))),e.setControlsText("")),e.show();var a=document.querySelector(".PostCopyrightBox__input");val(a,t.copyright?(0,l.unclean)(t.copyright):""),addEvent(a,"keypress",(t=>(0,d.onEnter)((()=>{this.copyrightBoxAccept(e)}),t))),a.focus()}})},copyrightChanged(){var e=this.markAsAdsData(!0).mark_as_ads;this.copyrightToggle(!e),G.onMediaChange&&G.onMediaChange()},copyrightData(e){var t=!!e&&{};return(this.copyrightInputData&&this.copyrightInputData.copyright||e)&&(t={copyright:this.copyrightInputData&&this.copyrightInputData.copyright||""}),t},urlsCancelled:[],shareData:{},checkMessageURLs:function(e,t,a){if(!(cur.noCheckMessageURLs||We.chosenMedia||We.urlAttachmentLoading&&We.urlAttachmentLoading[0]>vkNow()-1e4||We.attachCount()>=Xe)){if(cur.checkMessageHandler&&(0,g.isFunction)(cur.checkMessageHandler)&&cur.checkMessageHandler(e),cur.reply_to&&cur.reply_to[0]){var o=Wall.getReplyName(cur.reply_to[0]);if(o=o&&isArray(o)&&o[1]?o[1]:""){var n=extractUrls(o,t);for(var r in n)if(n.hasOwnProperty(r)){var s=n[r].url;s.match(/^https?:\/\//)||(s="http://"+s),inArray(s,We.urlsCancelled)||We.urlsCancelled.push(s)}}}var d=extractUrls(e,t).map((function(e){var t=e.url,a=e.query,o=e.domain,n=t,r={};t.match(/^https?:\/\//)||(t="http://"+t);var s=inArray(t,We.urlsCancelled)||inArray(n,We.urlsCancelled),d=!0,l=!1;s||o.match(new RegExp(String.raw`(^|\.|\/\/)${i.VK_HOST_REGEX_UNSAFE.source}`,"i"))&&(d=!!a.match(/(#photo|^\/(photo|video|album|page|audio|doc|mask|poll|podcast)|z=(album|photo|video|audio_playlist|podcast)|w=(page|product|poll))(-?\d+_)?\d+|app\d+(?:_-\d+)?|\.(jpg|png|gif)$|artist\/([^\/]+).*$|market-?\d+\?section=album_\d+|^\/stickers\/.+$|\?w\=story(\d+)_(\d+)$|stor(y|ies)(\d+)_(\d+)$|^(\/dev)?\/(blog|press|education)\/.+$|^\/jobs\?w=job\d+$|^\/landings\/.+$|^\/messenger$|^\/fellowship$|^\/talents$|^\/play_safe_at_home$|^\/sale_day$|^\/services$|^\/vk_apps_contest$|^\/home(\/.+)?$|^\/2020(\/.+)?$|^\/2021(\/.+)?$|^\/notify(\/.+)?$|^\/ahmatova(\/.+)?$|^\/backendoffer(\/.+)?$|^\/frontendoffer(\/.+)?$|^\/video-calls(\/.+)?$|^\/calls-sdk(\/.+)?$|^\/monetization(\/.+)?$|^\/grants(\/.+)?$|^\/ecosystem(\/.+)?$|^\/video-event(\/.+)?$|^\/mini-apps(\/.+)?$|^\/durer_hermitagemuseum(\/.+)?$|^\/messengerforbusiness(\/.+)?$|^\/content_makers(\/.+)?$|^\/mobile$|^\/miniapps_2019$|^\/data_protection(\?section=(rules|requests|principles|copyright))?$|^\/safety(\?section=(social|parents|youth|tips|health|standards|money|misinformation))?$|^\/ads(\/([a-zA-Z0-9\_]+))?$|^http:\/\/instagram\.com\/p\/.+/),a.match(qe)&&(d=!0),a.match(/narrative(-?\d+_\d+(?:_\d+)?)$/)&&(d=!0),a.match(/^(\/@[._a-zA-Z0-9-]+)([\?|\&]rev=[_a-z0-9]+|[\?|\&]anchor=[-a-zа-я0-9]+)*$/)&&(delete(r=nav.fromStr(t))[0],d=!0),!d&&a.match(/music\/(album|playlist)\/(-?\d+_\d+)(_[a-z0-9]+)?/)&&(d=!0,l=!1),!d&&a.match(/[a-zA-Z0-9_\.-]{2,32}/)&&(d=!0,l=!0));return e.url=t,e.canceled=s,e.valid=d,e.initialUrl=n,e.params=r,e.needsCheckDomain=l,e})).filter((function(e){return!e.canceled&&e.valid})).sort((function(e,t){return e.needsCheckDomain-t.needsCheckDomain}));if(d.length){var l=d[0];l.needsCheckDomain?We.checkURLDomain(l.query,l.initialUrl,a):We.checkURL(l.initialUrl,a,l.params)}}},checkURLDomain:function(e,t,a){cur.checkURLDomainTO&&clearTimeout(cur.checkURLDomainTO),cur.checkURLDomainTO=setTimeout(function(e,t,a){cur.checkURLDomainRequest=ajax.post("share.php",{act:"id_by_link",url:e,to_mail:G.mail},{onDone:function(e,i){(e||i)&&We.checkURL(t,a)},onFail:function(){return!0}})}.pbind(e,t,a),100)},clearCheckURL:function(){clearTimeout(cur.checkURLTO),re(We.urlAttachmentLoading[2]),Qe?toggle(_t,_t.childNodes>0):toggleClass(t,"med_no_attach",!t.childNodes),We.urlAttachmentLoading=!1,setStyle(bodyNode,{cursor:"default"})},onCheckURLDone:function(e,t,a){var i="";t=t||{},We.urlAttachmentLoading&&(i=We.urlAttachmentLoading[1],We.clearCheckURL()),e?We.chooseMedia(a[0],a[1],extend({},a[2],t),i,!0):((G.onCheckURLDone||function(){})(e,a),(t.onError||function(){})(a))},cancelCheckUrl:function(){re(We.checkURLForm)},_getShareTimeHash:function(){var e=cur.share_timehash||((cur.options||{}).share||{}).timehash||"",t=Math.floor(Date.now()/1e3),a=-1;return e&&(a=parseInt(e.split("_",1)[0])+36e3),a-t<60?(0,s.post)("share.php?act=renew_url_attachment_hash",{act:"renew_url_attachment_hash",hash:e}).then((function(e){var t=e[0];return cur.share_timehash=t,t})):Promise.resolve(e)},checkURL:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e?this._getShareTimeHash().then((function(o){We.urlsCancelled.push(e),We.urlAttachmentLoading=[vkNow(),e],re(We.checkURLForm),We.checkURLForm=ce("div",{innerHTML:'<iframe name="share_parse_iframe'+at+'"></iframe>'}),utilsNode.appendChild(We.checkURLForm);var n=We.checkURLForm.appendChild(ce("form",{action:"/share.php?act=url_attachment",method:"post",target:"share_parse_iframe"+at}));each(extend({hash:o,allowed_share_buttons:((cur.options||{}).share||{}).allowed_buttons||"",index:at,url:e,to_mail:G.mail?1:"",from:G.from,module:cur.module},a),(function(e,t){n.appendChild(ce("input",{type:"hidden",name:e,value:t}))})),setStyle(bodyNode,{cursor:"wait"}),window.onUploadDone=We.onCheckURLDone.pbind(!0,i),window.onUploadFail=We.onCheckURLDone.pbind(!1,i),t&&(cur.checkURLTO=setTimeout((function(){We.urlAttachmentLoading.length>0&&We.clearCheckURL()}),t)),n.submit()})):(i.onError||function(){})()},addPreview:function(e,t){var a=t?" medadd_c_link_hidden":"";return We.sharePreview=st.appendChild(ce("div",{className:"medadd_c medadd_c_link"+a,innerHTML:'<div class="medadd_c_linkcon"><div></div>'+(e?'<div class="medadd_c_linkprg">'+getProgressHtml("","medadd_c_linkprg_inner")+"</div>":"")+"</div>"}))},shareImgUrl:function(e){var t=We.shareData;if(isArray(t.preview_images)&&t.preview_images[e])return t.preview_images[e];if(t.images_proxy&&t.images_proxy[e])return t.images_proxy_url+t.images_proxy[e];if(t.images){var a=t.images[e];return isArray(a)&&(a=a[0]?a[0]:""),a}return""},initSnippetVideoFunctions:function(){cur.selectSnippetVideo=function(){var e={to_id:G.toId||cur.postTo,act:"a_choose_video_box",snippet_video:1,from:this.getFrom()};(0,n.showBox)("al_video.php",e,{cache:1,dark:1})},cur.chooseSnippetVideo=function(e,t){var a=We.shareData,i=e.split("_");a.video_owner_id=i[0],a.video_id=i[1],a.video_full_id=e,a.video=t;for(var o=!1,n=0,r=Object.keys(t.editable.sizes);n<r.length;n++){var s=r[n];(o&&t.editable.sizes[s][1]>t.editable.sizes[o][1]||!o)&&(o=s)}if(o){var d=t.editable.sizes[o];a.images[a.images.length-1]=[d[0],i[0],i[1],"video",t.editable.duration],cur.shareShowNext(0,1)}We.showVideoSnippetPreview()}},showPreview:function(e){var a,i,o,n=We.shareData,r=We.sharePreview||We.addPreview(),s=domFC(r),d=n.is_vk_mini_app,c=window.wkcur&&window.wkcur.shown&&window.wkLayerWrap&&isVisible(window.wkLayerWrap)||(null===(a=window.Videoview)||void 0===a?void 0:a.isLayerShown())||cur.pvLayerCreated,p="ads"===cur.module||n.ads_post,u="im"===cur.module;n.is_product?addClass(s,"medadd_c_link_product"):removeClass(s,"medadd_c_link_product"),toggleClass(s,"medadd_c_link_special",!(!n.prometheus&&!n.verification)),"comment"!==G.from||d||(n.images=[]),n.prometheus||n.verification||!n.images||(i=n.images[cur.shareShowImg],o=!(!We.bigLink&&!n.big_link||n.force_small_link));var h=!(!cur.options.share||!cur.options.share.allow_snippet_video)||p,g=n.video&&h,v="",m={};if(n.failed)v=(0,q.getLang)("page_not_loaded");else if(n.prometheus)v="im"===cur.module?'<a target="_blank" href="'+n.url+'">'+n.title+"</a>":getTemplate("prometheus_snippet",{author_img:n.prometheus_author_image_url}),e=!0;else if(n.verification)v="im"===cur.module?'<a target="_blank" href="'+n.url+'">'+n.title+"</a>":getTemplate("verification_snippet",{author_img:n.verification_author_image_url}),e=!0;else if(n.template){var b=n.template;b&&(v=getTemplate(b,n))}else{var k="",y=clean(We.shareImgUrl(cur.shareShowImg));if(h&&We.initSnippetVideoFunctions(),!y&&d&&n.images&&n.images[cur.shareShowImg]&&(y=n.images[cur.shareShowImg]),d&&c&&2!==n.images.length)y=W(n.images,2)[1];if(d&&n.edit_video&&(y=n.edit_video.thumb),n.images&&n.images[cur.shareShowImg]&&y){var C=n.images[cur.shareShowImg];if(n.images.length>0){var M,I=!(!cur.options.share||!cur.options.share.allow_custom_photo||n.disable_edit||vk.widget),T=I&&!(cur.options.share&&cur.options.share.require_image)&&!d,A="onmouseover=\"showTooltip(this, {text: '"+(0,q.getLang)("global_link_choose_own_photo")+"', black: 1, shift: [7, 11, 8], appendParentCls: 'post'})\"",x="onmouseover=\"showTooltip(this, {text: '"+(0,q.getLang)("global_link_choose_own_video")+"', black: 1, shift: [7, 11, 8], appendParentCls: 'post'})\"",D="onmouseover=\"showTooltip(this, {text: '"+(0,q.getLang)("global_link_remove_photo")+"', black: 1, shift: [7, 11, 8], appendParentCls: 'post'})\"",P=isArray(C)&&1==C.length,S=P&&!h,B=P&&h,$=n.media&&"_"!=n.media&&I?'<div class="medadd_c_linkimg_controls">  <div class="medadd_c_linkimg_controls_btn_group clear_fix fl_l">'+(n.images.length>1?'    <div class="medadd_c_linkimg_controls_btn_arrows_group">      <div class="medadd_c_linkimg_controls_btn" id="medadd_ctrl_left" onclick="cur.shareShowNext(true);"></div>      <div class="medadd_c_linkimg_controls_btn" id="medadd_ctrl_right" onclick="cur.shareShowNext();"></div>    </div>':"")+'<div class="medadd_c_linkimg_controls_btn '+(n.images.length>1?"medadd_c_btn_side_padd":"")+'" id="medadd_ctrl_upload" '+A+" onclick=\"Page.ownerPhoto('"+n.media+"');\"></div>"+(h?'<div class="medadd_c_linkimg_controls_btn '+(n.images.length>1?"medadd_c_btn_side_padd":"")+'" id="medadd_ctrl_upload_video" '+x+' onclick="cur.selectSnippetVideo();"></div>':"")+"  </div>"+(T?'  <div class="medadd_c_linkimg_controls_btn_group clear_fix fl_r">    <div class="medadd_c_linkimg_controls_btn" id="medadd_ctrl_remove" '+D+' onclick="window.tooltips && window.tooltips.hide(this); cur.removeLinkImage(this)"></div>  </div>':"")+"</div>":"",E=(i?"":"display: none")+";background-image:url("+y+")";n.image_ratio>0&&(E+=";height: 0px; padding-top: "+100*n.image_ratio+"%;min-height: 0px;");var L="video"===C[3]||n.edit_video,O="";d&&L&&(O+=" MiniAppsCoverWrapper--video");var N=C[4]||(null===(M=n.edit_video)||void 0===M?void 0:M.duration);k='<div class="medadd_c_linkimg_container '+(st&&st.offsetWidth>550?"medadd_c_linkimg_container_wide":"")+O+'" style="'+E+'">'+k+(L?'<div class="medadd_c_linkimg_container_video_overlay"></div>':"")+(L?'<div class="video_thumb_label"><span class="video_thumb_label_item"></span><span class="video_thumb_label_item">'+N+"</span></div>":"")+(S?'<div class="medadd_c_linkimg_button"><button class="flat_button secondary_dark" onclick="Page.ownerPhoto(\''+n.media+"');\">"+(0,q.getLang)("global_link_choose_own_photo")+"</button></div>":"")+(B?'<div class="medadd_c_linkimg_button"><div class="medadd_c_linkimg_button_half_container"><button class="flat_button secondary_dark" onclick="Page.ownerPhoto(\''+n.media+"');\">"+(0,q.getLang)("global_link_choose_own_photo")+'</button></div><div class="medadd_c_linkimg_button_half_container"><button class="flat_button secondary_dark medadd_c_linkimg_video_button" onclick="cur.selectSnippetVideo();">'+(0,q.getLang)("global_link_choose_own_video")+"</button></div></div>":"")+$+'<div id="medadd_c_linkimg_loader" class="medadd_c_linkimg_loader">'+getProgressHtml("","inv medadd_c_linkimg_loader_inner")+"</div></div>"}}var z="";n.microdata&&n.microdata_preview_html&&(z=n.microdata_preview_html),m={title:{placeholder:'<span class="medadd_inline_placeholder">'+(0,q.getLang)("global_link_edit_title")+"</span>",editable:cur.options.share&&cur.options.share.allow_edit_title&&!n.disable_edit&&!vk.widget},description:{placeholder:'<span class="medadd_inline_placeholder">'+(0,q.getLang)("global_link_edit_desc")+"</span>",editable:cur.options.share&&cur.options.share.allow_edit_desc&&!n.disable_edit&&!vk.widget},url:{placeholder:'<span class="medadd_inline_placeholder">'+(0,q.getLang)("global_link_edit_url")+"</span>",editable:cur.options.share&&cur.options.share.allow_edit_url&&!n.disable_edit&&!vk.widget}};var U=n.shareButtons,R=U&&U.length&&U[0],V=n.button_text||R&&R[1],H=n.button_text_lang||R&&R[2],j=n.button_action||R&&R[0];if(U&&U.length&&H===V)for(var Y=0;Y<U.length;++Y)if(U[Y][0]===j&&U[Y][2]===V){V=U[Y][1];break}var K=!1;U&&U.length&&(K=U.length>1||H===V||R[0]!==j||R[1]!==V);var X=!!U&&U.length,Q=cur.options.share&&cur.options.share.allow_remove_button&&!g;d&&!p&&(Q=!1);var J=clean(n.title).replace(/\n/g,"<br>"),Z=n.domain,ee="";d&&p&&(ee+=" MiniAppsSnippetWrap--ads"),d&&L&&(addClass(s,"MiniAppsSnippetCover--video"),ee+=" MiniAppsSnippetWrap--video"),d&&2===n.images.length&&(ee+=" MiniAppsSnippetWrap--small"),d&&(0,_.partConfigEnabled)("vk_mini_apps_new_web_snippet")&&stManager.add(["MiniAppsSnippet.css"]);var te="";if(d)te=(0,f.getIcon16Services)().icon;if(v=k+'<div class="medadd_c_linkwrap '+(k?"":"no_photo")+ee+'"><div class="medadd_c_linkwrap_block">'+(J||m.title.editable?'<div class="medadd_c_linkhead '+(m.title.editable?"medadd_inline_editable":"")+'">'+(m.title.editable?`<div class="medadd_inline_editable_icon">${(0,w.getIcon20WriteOutline)().icon}</div>`:"")+'<span class="medadd_inline_edit_target" data-max-length="'+(cur.options.share&&cur.options.share.max_title_len?cur.options.share.max_title_len:0)+'" data-field="title">'+(clean(n.title).replace(/\n/g,"<br>")||m.title.placeholder)+"</span></div>":"")+(z?'<div class="medadd_c_linkmicrodata">'+z+"</div>":"")+(Z||m.url.editable?`<div class="page_media_link_url medadd_c_linkaddr ${m.url.editable?"medadd_inline_editable":""}">${m.url.editable?'<div class="medadd_inline_editable_icon"></div>':""}<span class="medadd_inline_edit_target" data-max-length="2000" data-field="url" data-display-field="domain">${n.domain||"Url..."}</div>`:"")+"</div>"+(H&&X?'<div class="medadd_c_linkwrap_block medadd_c_linkwrap_block_button">'+(Q?'<div class="hide_icon medadd_c_linkbtn_remove" onclick="cur.shareRemoveButton();" onmouseover="showTooltip(this, {text: \''+(0,q.getLang)("global_share_button_remove_tooltip")+"', black: 1, shift: [15, 10, 0]})\"></div>":"")+'<div class="wall_postlink_preview_btn medadd_c_linkbtn"><a onclick="cur.toggleShareButton(this);return false;" onmouseout="Page.actionsDropdownHide(domNS(this), 0, cur.setActiveShareButton.pbind(false))" onmouseover="Page.actionsDropdownUnhide()" class="flat_button">'+te+'<span onmouseover="Page.actionsDropdownUnhide()" class="'+(K?"page_actions_dd_label":"")+' wall_postlink_preview_btn_label" data-field="button_text">'+H+"</span></a></div></div>":"")+'</div><div class="clear_fix"></div>',d&&u){v=k;var ae=`<h5 class="MiniAppsSnippetBottomFields__title">${J}</h5>`,ie=`<h6 class="MiniAppsSnippetBottomFields__description">${Z}</h6>`,oe=`<h6 class="MiniAppsSnippetBottomFields__type_description">${(0,q.getLang)("apps_snippet_mini_app")}</h6>`,ne=F.FlatButton.render({size:F.FlatButtonSize.S,appearance:F.FlatButtonAppearance.PRIMARY,className:"MiniAppsSnippetBottomButton",children:H,before:te}).outerHTML;v+=o?`\n            <div class="MiniAppsSnippetBottom">\n              <div class="MiniAppsSnippetBottomFields">\n                ${ae}\n                ${ie}\n                ${oe}\n              </div>\n              ${ne}\n            </div>\n          `:`\n              <div class="MiniAppsSnippetFields">\n                 ${ae}\n                 ${ie}\n                 ${oe}\n                 ${ne}\n              </div>\n            `}}if(o?addClass(s,"medadd_c_linkimg_big"):removeClass(s,"medadd_c_linkimg_big"),e)cur.preventShareAnim&&(cur.preventShareAnim.stop(),clearInterval(cur.animateUpdateInterval),G.onChangedSize&&G.onChangedSize()),val(s,v),s.style.height="auto",shortCurrency();else{show(st);var de="";d&&L&&(de+=" MiniAppsSnippet--video");var le=t.appendChild(ce("div",{innerHTML:'<div class="medadd_c_linkcon '+(o?"medadd_c_linkimg_big":"")+de+'">'+v+"</div>"},{position:"absolute",width:getSize(r)[0]-10,visibility:"hidden"})),_e=getSize(le)[1];re(le),setStyle(s,{height:"0"}),setStyle(r,{overflow:"hidden"}),val(s,v),shortCurrency(),cur.animateUpdateInterval=setInterval((function(){G.onChangedSize&&G.onChangedSize()}),100),cur.preventShareAnim=animate(s,{height:_e},200,(function(){setStyle(s,{height:"auto",display:""}),setStyle(r,{overflow:""}),clearInterval(cur.animateUpdateInterval),G.onChangedSize&&G.onChangedSize()})),re(geByClass1("medadd_c_linkprg",st))}function pe(e){var t=new RegExp(/^([\w-]*:\/\/)|(tel:).*$/),a=new RegExp(/^(?:tel:)?\+?[0-9()-]+$/),i=new RegExp(/^(([a-zа-я0-9]|[a-zа-я0-9][a-zа-я0-9\-]*[a-zа-я0-9])\.)*([a-zа-я0-9]|[a-zа-я0-9][a-zа-я0-9\-]*[a-zа-я0-9])$/i),o=new RegExp(/^([\w-]*:\/\/)?([a-zа-я0-9\-]+(?:[\-\.]{1}[a-zа-я0-9\-]+)*\.[a-zа-я0-9\-]{2,22})(:[0-9]{1,5})?([\/\?\#].*)?$/i);if(!e||e.inlineEdit)return!1;var n=getSize(e),r=gpeByClass("medadd_inline_editable",e);e.inlineEdit=!0,addClass(r,"medadd_inline_editing"),removeClass(r,"medadd_inline_invalid");var s=ce("textarea",{className:"medadd_inline_edit"},{width:n[0],height:n[1]}),d=parseInt(e.getAttribute("data-max-length"));d&&s.setAttribute("maxlength",d);var c=e.getAttribute("data-field"),_=e.getAttribute("data-display-field");val(s,(0,l.unclean)(We.shareData[c])),val(e,""),e.appendChild(s);var p=ce("span",{className:"medadd_inline_edit_target"},{opacity:0,zIndex:-1,width:n[0],height:"auto",wordWrap:"break-all",position:"absolute"});r.appendChild(p);var u=n[1];if(elfocus(s),"url"===c){var h=We.shareData[c];a.test(h)&&val(s,(0,l.unclean)(h.replace("tel:",""))),s.onkeydown=function(e){32!==e.which&&32!==e.keyCode||e.preventDefault(),13!==e.which&&13!==e.keyCode||(e.preventDefault(),s.blur())},s.oninput=function(){var e=this;cur.editingPostUrlCleanTimeout&&clearTimeout(cur.editingPostUrlCleanTimeout),cur.editingPostUrlCleanTimeout=setTimeout((function(){e.value=e.value.replace(/[\n ]/g,"")}))}}s.onblur=function(){if(s.oninput=null,removeClass(r,"medadd_inline_editing"),re(p),clearTimeout(cur.editingPostUrlCleanTimeout),We.shareData[c]=val(s),"url"===c&&We.shareData[c])try{var n=We.shareData[c];if(a.test(n.replace(/[\h\s(\)-]/g,"")))n=n.replace(/[\h\s\(\)-]|(tel:)/g,""),We.shareData.domain="...",We.shareData[c]="tel:"+n,e.inlineEdit=!1,ajax.post("share.php",{act:"check_phone",url:We.shareData[c]},{onDone:function(t){var a;t&&t.formattedPhone?(We.shareData.domain=clean(t.formattedPhone),a=We.shareData.domain):(addClass(r,"medadd_inline_invalid"),We.shareData.domain=(0,q.getLang)("global_link_invalid_url"),a=We.shareData.domain),val(e,clean(a).replace(/\n/g,"<br>")||m[c].placeholder)},onFail:function(){addClass(r,"medadd_inline_invalid"),We.shareData.domain=(0,q.getLang)("global_link_invalid_url")}});else{t.test(n)||(n="https://"+n);var d=new URL(n);if(!d.host||!i.test(d.host)||!o.test(n))throw new Error("Invalid url");if(a.test((0,l.unclean)(We.shareData.domain).replace(/[\h\s\(\)-]/g,""))||i.test(We.shareData.domain)||We.shareData.domain===(0,q.getLang)("global_link_invalid_url")||We.shareData.domain===(0,q.getLang)("global_link_edit_url")){var u=n.match(o);We.shareData[c]=n.replace(o,"$1"+u[2].toLowerCase()+"$3$4"),We.shareData.domain=u[2].toLowerCase()}}}catch(e){addClass(r,"medadd_inline_invalid"),We.shareData.domain=(0,q.getLang)("global_link_invalid_url")}var h;"url"!==c||We.shareData[c]||(We.shareData.domain=(0,q.getLang)("global_link_edit_url")),h=_&&We.shareData[_]?We.shareData[_]:val(s),val(e,clean(h).replace(/\n/g,"<br>")||m[c].placeholder),e.inlineEdit=!1};var g=function(){var e=clean(val(s)+" M").replace(/\n/g,"<br>");val(p,e);var t=getSize(p);u!=t[1]&&(u=t[1],animate(s,{height:t[1]},200))};addEvent(s,"click keyup change",g),setTimeout(g,0)}if(m.title&&m.title.editable){var ue=geByClass1("medadd_c_linkhead",s),he=geByClass1("medadd_inline_edit_target",ue);ue&&he&&(ue.onclick=pe.bind(this,he))}if(m.description&&m.description.editable){var ge=geByClass1("medadd_inline_edit_target",geByClass1("medadd_c_linkdsc",s));ge&&(ge.onclick=pe.bind(this,ge))}if(m.url&&m.url.editable){var ve=geByClass1("medadd_c_linkaddr",s),me=geByClass1("medadd_inline_edit_target",ve);ve&&me&&(ve.onclick=pe.bind(this,me)),G.linkTooltip&&!cur.linkTooltip&&ve&&(cur.linkTooltip=new ElementTooltip(G.linkTooltip.el(ve),G.linkTooltip.opts),G.linkTooltip.timeout?setTimeout((()=>cur.linkTooltip.show()),G.linkTooltip.timeout):cur.linkTooltip.show())}if(X&&(We.shareData.button_text=V,We.shareData.button_text_lang=H,We.shareData.button_action=j,K)){var we=domPN(geByClass1("wall_postlink_preview_btn_label",s)),fe=[],be=0,ke=0,ye=[];for(var Y in U)if(U.hasOwnProperty(Y)){var Ce=U[Y];Ce[0]==j&&Ce[1]==V&&(be=ke),fe.push([ke++,Ce[1]]),ye.push('<a class="page_actions_item" tabindex="0" role="link" onclick="cur.updateShareButton(this);Page.actionsDropdownHide(domPN(domPN(this)), 1, cur.setActiveShareButton.pbind(false));return false;" data-button-text="'+Ce[1]+'" data-button-text-lang="'+Ce[2]+'" data-button-action="'+Ce[0]+'">'+Ce[2]+"</a>")}we.setAttribute("data-items",JSON.stringify(fe)),we.setAttribute("data-value",be);var Me=['<div class="page_actions_wrap medadd_c_linkbtn_actions_wrap unshown" onmouseout="Page.actionsDropdownHide(this, 0, cur.setActiveShareButton.pbind(false))" onmouseover="Page.actionsDropdownUnhide()" onmouseup="setTimeout(function() { Page.actionsDropdownUnhide(); }, 5)">','<div class="page_actions_inner">',ye.join(""),"</div>","</div>"].join("");domPN(we).appendChild(se(Me)),ls.get("share_button_text_tooltip_shown")||cur.buttonTextTooltip||setTimeout((function(){cur.closeButtonTextTooltip=function(){cur.buttonTextTooltip.hide(),ls.set("share_button_text_tooltip_shown",1)};var e=geByClass1("wall_postlink_preview_btn_label",s),t=domCA(e,".box_layout");cur.buttonTextTooltip=new ElementTooltip(e,{autoShow:!1,appendTo:t||geByTag1("body"),content:'<div class="feature_intro_tt_hide" onclick="cur.closeButtonTextTooltip();"></div>'+(0,q.getLang)("global_share_button_text_tooltip"),forceSide:"left",cls:"feature_intro_tt feature_intro_blue_tt",offset:[-10,0,0],onHide:function(){cur.buttonTextTooltip.destroy()}}),cur.buttonTextTooltip.show(),addEvent(e,"mouseover",(function(){cur.buttonTextTooltip&&cur.buttonTextTooltip.hide()}))}),Ae)}},showVideoSnippetPreview:function(){if(!(!cur.options.share||!cur.options.share.allow_snippet_video)){var e=We.shareData,t=e.video,a=e.video_owner_id,i=e.video_id;t&&isObject(t)&&a&&i&&t.editable&&(We.initSnippetButtonFunctions(),We.showPreview())}},initSnippetButtonFunctions:function(){cur.shareRemoveButton=function(){var t=We.sharePreview;window.tooltips&&tooltips.destroyAll(t),re(geByClass1("medadd_c_linkwrap_block_button",t)),We.shareData.button_text="",We.shareData.button_text_lang="",We.shareData.button_action="",show(domByClass(e,"media_selector"))},cur.updateShareButton=function(e){var t=e.getAttribute("data-button-text"),a=e.getAttribute("data-button-text-lang"),i=e.getAttribute("data-button-action");We.shareData.button_text=t,We.shareData.button_text_lang=a,We.shareData.button_action=i;var o=We.sharePreview;return val(geByClass1("page_actions_header_inner",o),a),val(geByClass1("wall_postlink_preview_btn_label",o),a),!1},cur.setActiveShareButton=function(e){var t=We.sharePreview;(e?addClass:removeClass)(domPN(geByClass1("wall_postlink_preview_btn_label",t)),"active")},cur.toggleShareButton=function(e){hasClass(e,"active")?(Page.actionsDropdownHide(domNS(e),1),cur.setActiveShareButton(!1)):(Page.actionsDropdown(domNS(e)),cur.setActiveShareButton(!0))}},showExternalPreview:function(){var e=We.shareData;e.images||(e.images=[]);var t,a=[],i=[],o={};each(e.images,(function(t,n){o[n]||(o[n]=!0,a.push(n),e.images_proxy&&i.push(e.images_proxy[t]))})),e.uniqueImagesCount=a.length,e.images=a,e.images_proxy=i;var n=!(!cur.options.share||!cur.options.share.allow_snippet_video);if(t=st&&st.offsetWidth>550?isRetina()?"/images/post_snippet_image_placeholder_w_2x.png":"/images/post_snippet_image_placeholder_w.png":n?isRetina()?"/images/post_snippet_image_video_placeholder_2x.png":"/images/post_snippet_image_video_placeholder.png":isRetina()?"/images/post_snippet_image_placeholder_2x.png":"/images/post_snippet_image_placeholder.png",e.placeholder_inserted||(e.images.push([(cur.options.share||{}).allow_custom_photo&&!vk.widget?t:""]),e.placeholder_inserted=!0),!e.images||!e.images.length)return cur.shareShowImg=0,void We.showPreview();cur.shareShowImg=0,cur.shareShowImg--,We.addPreview(!0,!!e.map_data),e.imagesStyles={};var r=!1;cur.shareSetOwnPhoto=function(t){curBox()&&curBox().hide(),We.bigLink=!0,e.isPhotoEdit=!0,e.images[e.images.length-1]=[t.photo_url,t.user_id,t.photo_id],cur.shareShowNext(0,1)},cur.shareClearOwnPhoto=function(){e.images[e.images.length-1]=[],cur.shareShowNext(0,0,1)},cur.removeLinkImage=function(t){var a=gpeByClass("medadd_c_linkcon",t);addClass(a,"no_photo"),removeClass(a,"medadd_c_linkimg_big"),re(gpeByClass("medadd_c_linkimg_container",t)),setStyle(a,"height",""),e.video_edit&&e.is_vk_mini_app&&removeClass(a,"MiniAppsCoverWrapper--video"),We.shareData.noPhoto=!0},We.initSnippetButtonFunctions(),cur.shareShowNext=function(a,i,o){var n=vkImage(),s="ads"===cur.module;cur.prevShareShowDir=a,o||(i?cur.shareShowImg=e.images.length-1:a?cur.shareShowImg-=1:cur.shareShowImg+=1);var d=cur.shareShowImg;!e.is_vk_mini_app||-1!==d&&2!==d||s||e.isPhotoEdit||(cur.shareShowImg=a?1:0);var l=isArray(e.images[e.images.length-1])&&!!e.images[e.images.length-1][0];if(!l&&cur.shareShowImg>e.images.length-2)cur.shareShowImg=0;else if(cur.shareShowImg>e.images.length-1)cur.shareShowImg=0;else if(!l&&cur.shareShowImg<0)cur.shareShowImg=e.images.length-2;else if(cur.shareShowImg<0)cur.shareShowImg=e.images.length-1;else if(0==cur.shareShowImg)for(var c=1;c<e.images.length-1;c++){vkImage().src=We.shareImgUrl(c)}if(!e.images.length||isEmpty(e.images)||void 0===e.images[cur.shareShowImg])return We.showPreview(r),void(r=!0);var _=We.shareImgUrl(cur.shareShowImg);_&&(n.src=_),e.video=0,isArray(e.images[cur.shareShowImg])&&e.images[cur.shareShowImg][1]&&e.images[cur.shareShowImg][2]?"video"===e.images[cur.shareShowImg][3]?(e.video=1,e.video_owner_id=e.images[cur.shareShowImg][1],e.video_id=e.images[cur.shareShowImg][2]):(e.user_id=e.images[cur.shareShowImg][1],e.photo_id=e.images[cur.shareShowImg][2],e.share_own_image=!0):(e.user_id=void 0,e.photo_id=void 0,e.share_own_image=!1);var p=null;_&&(cur.imgLoadTimeout=p=setTimeout((function(){!0!==cur.shareImgInterval&&(isArray(e.images[cur.shareShowImg])||(e.images.splice(cur.shareShowImg,1),e.images_proxy&&e.images_proxy.length>cur.shareShowImg&&e.images_proxy.splice(cur.shareShowImg,1),cur.shareShowNext()))}),5e3));var u=setTimeout((function(){show("medadd_c_linkimg_loader"),u=null,G.onChangedSize&&G.onChangedSize()}),100);cur.showLoaderTimeout=u;var h=function(){if(n.width||n.height||!_){var a=n.width,i=n.height,o="",s="";if(p&&(clearTimeout(p),p=null),u&&(clearTimeout(u),u=null),hide("medadd_c_linkimg_loader"),clearInterval(cur.shareImgInterval),!isArray(e.images[cur.shareShowImg])&&(a<150||i<67)){if(e.images.splice(cur.shareShowImg,1),e.images_proxy&&e.images_proxy.length>cur.shareShowImg&&e.images_proxy.splice(cur.shareShowImg,1),e.images.length)return setTimeout(cur.shareShowNext.pbind(0,0,1),0)}else{var d=a>=532&&i>=235,l=(d||!!e.big_link)&&!e.force_small_link;if(cur.options.share&&cur.options.share.force_big_link&&!d){e.images.splice(cur.shareShowImg,1),e.images_proxy.splice(cur.shareShowImg,1);var c=(cur.options.share||{}).allow_custom_photo||(cur.options.share||{}).require_image;return 0==e.images.length&&c&&e.images.push([c?t:""]),cur.prevShareShowDir||cur.shareShowImg--,void cur.shareShowNext(cur.prevShareShowDir)}We.bigLink=l,l?o="width: 100%;":(a>150&&(i=150*i/a,a=150),o="width: "+a+"px; height: "+i+"px;")}e.images.length>1&&(s=""),e.imagesStyles[cur.shareShowImg]='style="'+o+'"'+s,We.showPreview(r),r=!0,G.onAddMediaChange&&G.onAddMediaChange("share",e.media,e)}};clearInterval(cur.shareImgInterval),cur.shareImgInterval=setInterval(h,300),cur.shareImgInterval2=setTimeout(h,0)},cur.shareShowNext()},uploadShare:function(e){var t=We.shareData,a=We.sharePreview,i=a.appendChild(ce("div",{innerHTML:'<iframe class="upload_frame" name="share_upload_iframe'+at+'"></iframe>'})),o=i.appendChild(ce("form",{action:"/share.php",method:"post",target:"share_upload_iframe"+at})),n=t.images[cur.shareShowImg];each({act:"a_photo",url:t.url,index:at,image:n,extra:t.extra||0,hash:vk.ip_h},(function(e,t){o.appendChild(ce("input",{type:"hidden",name:e,value:t}))})),window.onUploadDone=function(t,o){window.onUploadFail=window.onUploadDone=function(){},a.removeChild(i),We.shareData=extend(We.shareData,{user_id:o.user_id,photo_id:o.photo_id,photo_url:n}),setTimeout(e,0)},window.onUploadFail=function(t,o){window.onUploadFail=window.onUploadDone=function(){},a.removeChild(i),We.shareData.share_upload_failed=1,setTimeout(e,0)},cur.shareLastParseSubmitted=vkNow(),o.submit()},setupPostpone:function(e,a,i){var o;o=Qe||ct?ct:domPN(geByClass1("page_preview_postpone_wrap",t));var n=cur.editingPost&&"wpe_media_preview"==domPN(o).id,r=n||!Qe?"":"1px",s=!1,d=`<div class="clear_fix">\n        <div class="fl_l datepicker_item"><input type="hidden" id="postpone_date${at}" value="${e.date||""}" /></div>\n        <div class="fl_l datepicker_item medadd_c_timerat">${e.lang.profile_wall_postpone_at}</div>\n        <div class="fl_l datepicker_item"><input type="hidden" id="postpone_time${at}"/></div></div>`,l=void 0!==e.friends_only;cur.editingPost&&l?(d+='<div class="medadd_c_timersett">',We.visibilityAddSelect(e),s=!0):cur.editingPost&&a&&(d+=a,s=!0),et||(We.postponePreview=o.appendChild(ce("div",{className:"medadd_c medadd_c_timer clear_fix"+(s?" medadd_c_nofixed":"")+(et?" timer_in_tt":""),innerHTML:d}))),et&&(We.postponeSubmitWrapper=se(`<div><input type="hidden" id="postpone_date${at}" value="${e.date||""}"><input type="hidden" id="postpone_time${at}"></div>`),o.appendChild(We.postponeSubmitWrapper)),et||(We.postponePreview.style.height=r);var c=`datepicker-inline-container_${at}`,_=F.FlatButton.render({className:"reset_time_btn",appearance:F.FlatButtonAppearance.SECONDARY,size:F.FlatButtonSize.M,children:(0,q.getLang)("wall_post_timer_reset"),restAttrs:{onclick:`cur.addMedia[${at}].onResetPostponeBtnClick(event)`}}),p=`<td class="cal_clear" id="${c}" colspan="7">${_.outerHTML}</td>`;stManager.add(["ui_controls.css","ui_controls.js","datepicker.css",window.jsc("web/datepicker.js")],(function(){We.postponeDatepicker=new Datepicker("postpone_date"+at,{time:"postpone_time"+at,width:155,noPast:!0,minStep:1,sideTop:cur.oid<0,sideTopOffset:10,inlineTime:et,inlineTimeContainerId:c,inlineTimeContainerIdx:at,addRows:et?"<tr>"+p+"</tr>":null,addRowsM:et?'<tr><td class="cal_clear" colspan="7"></td></tr>':null,onUpdate:function(e,t){var a=[...arguments];G.onMediaChange&&G.onMediaChange.apply(G,a),We.postponeDate=val("postpone_date"+We.lnkId),et&&We.updatePostponeBtn()},hideAnotherMonth:!1}),n||!Qe||et||animate(We.postponePreview,{height:33},200,(function(){We.postponePreview.style.height=""})),We.menu.postponeBtn&&We.updatePostponeBtn(),(0,g.isFunction)(i)&&i()}))},getPostponeDateString:function(e){if(val("postpone_date"+We.lnkId)||e){e=(e=e||+val("postpone_date"+We.lnkId))+(60*(new Date).getTimezoneOffset()+intval(vk.tz))+intval(vk.dt);var t=(0,q.getLang)("datepicker_dateFormat");"dateFormat"===t&&(t="{day} {month} {year}");var a=new Date(1e3*e),i=a.getDate(),o=a.getMonth()+1,n=a.getFullYear();return t.replace("{day}",i).replace("{month}",winToUtf((0,q.getLang)("Month"+o+"_of"))).replace("{year}",n)+` ${(0,q.getLang)("profile_wall_postpone_at")} `+`${a.getHours()}:${("0"+a.getMinutes()).slice(-2)}`}},onResetPostponeBtnClick(e){cur["postPostponeTT"+We.lnkId].hide(),null!=We.postponeInd&&setTimeout((()=>{We.unchooseMedia(We.postponeInd)}),ElementTooltip.FADE_SPEED),cancelEvent(e)},resetPostpone:function(e){if(e){e=e+(60*(new Date).getTimezoneOffset()+intval(vk.tz))+intval(vk.dt);var t=new Date(1e3*e);if(t){var a=t.getDate(),i=t.getMonth()+1,o=t.getFullYear(),n=t.getHours(),r=t.getMinutes();We.postponeDatepicker.timePicker.hourDD.val(n),We.postponeDatepicker.timePicker.minDD.val(r),We.postponeDatepicker.setDate(o,i,a,null,n,r)}}},updatePostponeBtn:function(e,t){if(et){var a=geByClass1("post_action_btn_text",We.menu.postponeBtn),i=We.menu.postponeBtn.querySelector(".post_action_image_btn"),o="";if(e){We.menu.postponeBtn.classList.remove("on");var n=(0,$.getIcon12Dropdown)().icon;i.innerHTML=n,i.removeAttribute("title"),i.classList.remove("_close"),o=(0,q.getLang)("wall_publication_now")}else{var r=We.getPostponeDateString(t);if(!r)return;We.menu.postponeBtn.classList.add("on");var s=i.querySelector(".post_action_image_btn_close_wrapper");if(!s){var d=(0,U.getIcon12CancelOutline)().icon;(s=document.createElement("span")).classList.add("post_action_image_btn_close_wrapper"),s.innerHTML=d,i.innerHTML="",i.appendChild(s),i.title=replaceEntities((0,q.getLang)("wall_post_timer_reset")),i.classList.add("_close")}o=r}a.innerHTML=o,a.setAttribute("aria-label",replaceEntities(o))}},createPrettyCards:function(e){cur.lang=extend(cur.lang||{},e.lang||{});var t=se(e.editor.container_html);st.appendChild(t),We.prettyCardGallery=new PrettyCardGallery(t,e.editor,e.pretty_cards)},visibilityAddSelect:function(e){var t,a=!1,i=!1;e.friends_only?(a=!0,t="name_friends_only"):e.best_friends_only?(i=!0,t="name_best_friends_only"):t="name_no_friends_only";var o=se(getTemplate("visibility_access",{link_id:at}));toggleClass(o,"on",a),toggleClass(o,"best_friends_only",i);var n=geByClass1(t,o),r="post_visibility_btn",s=+domData(n,"value"),d=geByClass1("post_action_btn_text",o),l=i?(0,q.getLang)("wall_best_friends_only"):(0,H.getPostTooltipOptionText)(n);if(val(d,l),attr(d,"aria-label",l),o){var c=geByClass1("post_action_btn",je);c?je.insertBefore(o,c):je.appendChild(o),Wall.createPostTooltip(r,at)}(0,H.updatePostTooltipActionRadioBtn)(n,s,"post_settings_btn"+r+at)},donutVisibilityAddSelect(e){var t=(0,p.donutVisibilityInit)(e);t&&t.donutPostSettings&&(We.donutPostSettings=t.donutPostSettings)},donutUpdateVisibility(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;We.donutPostSettings&&We.donutPostSettings.donutUpdateVisibility(e)},destroy:function(){(nt||{}).sorter&&nt.sorter.destroy();for(var a=0;a<tt.handlersToClean.length;a++)tt.handlersToClean[a]();(ot||{}).qsorter&&ot.qsorter.destroy(),removeClass(t,"media_preview_has_medias"),t&&(t.innerHTML=""),show(e),G.cleanOnDestroy&&delete cur.addMedia[at]},qsorterOpts:function(){return{xsize:Math.floor(ot.offsetWidth/135),width:135,height:102,onReorder:G.onAddMediaChange,clsUp:"pam_dpic_up"}},resized:function(){window.ThumbsEdit&&ThumbsEdit.setWide("thumbs_edit"+cur.wallEditComposer.addMedia.lnkId),ot.qsorter&&(ot.qsorter.destroy(),window.qsorter.init(ot,We.qsorterOpts()))}},We.copyrightInit(),We.markAsAdsInit(),We.onMediaTypesInit(),cur.addMedia||(cur.addMedia={}),cur.addMedia[at]=We,G.onAddMediaChange&&(We.onChange=G.onAddMediaChange),tt.activate(),We}}},294071:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});const i=new WeakMap;function o(e,t,a,o){var n,r;if(!e&&!i.has(t))return!1;const s=null!==(n=i.get(t))&&void 0!==n?n:new WeakMap;if(i.set(t,s),!e&&!i.has(t))return!1;const d=null!==(r=s.get(a))&&void 0!==r?r:new Set;s.set(a,d);const l=d.has(o);return e?d.add(o):d.delete(o),l&&e}const n=function e(t,a,i,n,r){if("string"==typeof t&&(t=document.querySelectorAll(t)),"function"!=typeof t.addEventListener){const o=Array.prototype.map.call(t,(t=>e(t,a,i,n,r)));return{destroy(){o.forEach((e=>e.destroy()))}}}const s=t,d=Boolean("object"==typeof r?r.capture:r),l=e=>{const t=e.target.closest(a);t&&(e.delegateTarget=t,e.currentTarget.contains(e.delegateTarget)&&n.call(s,e))},c=JSON.stringify({selector:a,type:i,capture:d}),_={destroy(){s.removeEventListener(i,l,r),o(!1,s,n,c)}};return o(!0,s,n,c)||s.addEventListener(i,l,r),_}},653629:(e,t,a)=>{"use strict";a.d(t,{POST_PARAM_DONUT_DURATION:()=>i});var i="donut_duration"},745626:(e,t,a)=>{"use strict";a.d(t,{findAllIndices:()=>i});var i=function(e,t){return e.reduce((function(e,a,i){return t(a)?e.concat(i):e}),[])}},712787:(e,t,a)=>{"use strict";a.d(t,{ATTACH_DATA_DONUT_DURATION:()=>i,MEDIA_TYPE_DONUT_DURATION:()=>o,DONUT_DURATION_DEFAULT:()=>n,WALL_SAVE_RESPONSE_IS_MARKED_AS_DONUT:()=>r});var i="donut_duration",o="donut_duration",n=-1,r="is_marked_as_donut"},543570:(e,t,a)=>{"use strict";a.d(t,{donutVisibilityInit:()=>m});var i=a(570655),o=a(294071),n=a(315544),r=a(695724),s=a(963188),d=a(325637),l=a(353787),c=a(712787),_=a(49535),p=a(386409),u=a(490827),h=a(66433),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t}(Error),v=function(){function e(t,a){var i=this;this.containerEl=t,this.addMedia=a,this.updateView=function(){i.isInitialized&&(i.actionsUpdateVisibilityView()&&(i.tooltipVisibilityUpdateView(),i.tooltipDurationUpdateView()))},this.chooseDonutVisibility=function(t){var a,o,n=e.getEventParams(t);if(!n)return!1;null===(o=null===(a=i.tooltipDonutVisibility)||void 0===a?void 0:a.hide)||void 0===o||o.call(a),i.setDonutDuration(n.donut_duration)},this.chooseDonutDuration=function(t){var a,o,n=e.getEventParams(t);if(!n)return!1;null===(o=null===(a=i.tooltipDonutDuration)||void 0===a?void 0:a.hide)||void 0===o||o.call(a),i.setDonutDuration(n.donut_duration)};try{this.tooltipVisibilityInitView(),this.tooltipDurationInitView(),this.isInitialized=!0,this.updateView();var o=this.getEmitter();o&&o.on(this.addMedia.eventTypes.mediaUpdate,this.updateView)}catch(e){e instanceof g||(0,h.logError)(e),console.error(e),this.isInitialized=!1}}return e.prototype.setPostDonutOnly=function(){this.setDonutDuration(c.DONUT_DURATION_DEFAULT)},e.prototype.donutUpdateVisibility=function(e){this.actionsUpdateVisibilityView(e)},e.prototype.getEmitter=function(){return this.addMedia.emitter},e.prototype.tooltipVisibilityInitView=function(){var t,a=this.getLnkId(),i=(0,r.getTemplate)("visibility_access_donut",{link_id:a});if(!i)throw new g;if(this.visibilityTooltipEl=(0,n.se)(i),!this.visibilityTooltipEl)throw new g;(0,d.domInsertChildAfterOtherChild)(this.visibilityTooltipEl,this.containerEl),this.tooltipDonutVisibility=null===(t=(0,s.createPostTooltip)(e.TOOLTIP_VISIBILITY_NAME,a))||void 0===t?void 0:t.toooltip,(0,o.default)(this.containerEl,e.TOOLTIP_VISIBILITY_OPTION_SELECTOR,"click",this.chooseDonutVisibility)},e.prototype.tooltipDurationInitView=function(){var t,a=this.getLnkId(),i=(0,r.getTemplate)("donut_duration_select",{link_id:a});if(!i)throw new g;if(this.durationTooltipEl=(0,n.se)(i),!this.durationTooltipEl)throw new g;(0,d.domInsertChildAfterOtherChild)(this.durationTooltipEl,this.containerEl,this.visibilityTooltipEl),this.tooltipDonutDuration=null===(t=(0,s.createPostTooltip)(e.TOOLTIP_DURATION_NAME,a))||void 0===t?void 0:t.toooltip,(0,o.default)(this.containerEl,e.TOOLTIP_DURATION_OPTION_SELECTOR,"click",this.chooseDonutDuration)},e.prototype.getLnkId=function(){return this.addMedia.lnkId},e.getEventParams=function(e){var t,a=e.delegateTarget||e.target;return!(0,_.checkEvent)(e)&&a instanceof HTMLElement&&(null===(t=(0,l.getActionData)(a))||void 0===t?void 0:t.actionParams)},e.prototype.setDonutDuration=function(t){var a;e.isDurationValueEmpty(t)?this.addMedia.unchooseMediaForType(c.MEDIA_TYPE_DONUT_DURATION):this.addMedia.addOrUpdateChosenMedia(c.MEDIA_TYPE_DONUT_DURATION,"",((a={})[c.ATTACH_DATA_DONUT_DURATION]=t,a))},e.isDurationValueEmpty=function(e){return null===e},e.prototype.getTooltipVisibilityActiveElement=function(t){var a=null!==t?c.DONUT_DURATION_DEFAULT:null;return this.containerEl.querySelector(e.TOOLTIP_VISIBILITY_OPTION_SELECTOR+'[data-value="'+a+'"]')},e.prototype.getTooltipDurationActiveElement=function(t){return this.containerEl.querySelector(e.TOOLTIP_DURATION_OPTION_SELECTOR+'[data-value="'+t+'"]')},e.prototype.getActiveDurationOption=function(){var e=this.addMedia.findChosenMedia(c.MEDIA_TYPE_DONUT_DURATION),t=e?(0,u.getDurationFromMediaItem)(e):void 0;return void 0!==t?t:null},e.prototype.tooltipVisibilityUpdateView=function(){var t=this.getActiveDurationOption(),a=String(this.getLnkId())||"",i=this.getTooltipVisibilityActiveElement(t),o=!e.isDurationValueEmpty(t),d=this.visibilityTooltipEl;(0,s.updatePostTooltipActionRadioBtn)(i,t,"post_settings_btn"+e.TOOLTIP_VISIBILITY_NAME+a);var l=null==d?void 0:d.querySelector(".post_action_btn_text"),c=i&&(0,s.getPostTooltipOptionText)(i)||"";l&&c&&(l.innerHTML=c,l.setAttribute("aria-label",(0,r.replaceEntities)(c))),(0,n.toggleClass)(d,"on",o)},e.prototype.tooltipDurationUpdateView=function(){var t=this.getActiveDurationOption(),a=String(this.getLnkId())||"",i=this.getTooltipDurationActiveElement(t),o=!e.isDurationValueEmpty(t),l=o&&!!t&&(0,d.isDonutDurationFinite)(t),c=this.durationTooltipEl;(0,s.updatePostTooltipActionRadioBtn)(i,t,"post_settings_btn"+e.TOOLTIP_DURATION_NAME+a);var _=null==c?void 0:c.querySelector(".post_action_btn_text"),u=l?i&&(0,s.getPostTooltipOptionText)(i):(0,n.domData)(_,"empty"),h=i?u:"";_&&h&&(_.innerHTML=h,_.setAttribute("aria-label",(0,r.replaceEntities)(h))),(0,n.toggleClass)(c,"on",l),(0,n.toggleClass)(c,"visible",o);var g=this.addMedia.markAsAdsGetCheckboxEl();g&&(0,p.disable)(g,o)},e.prototype.actionsUpdateVisibilityView=function(e){var t=null!=e?e:this.getPostboxForNewPost(),a=(0,u.isDonutPostSettingVisible)(t,this.addMedia);return this.visibilityTooltipEl&&this.durationTooltipEl?((0,n.toggleClass)(this.containerEl,"post_actions_btns--donut-actions-hidden",!a),a):a},e.prototype.getPostboxForNewPost=function(){return"post_actions_btns"===this.containerEl.id?document.querySelector("#submit_post_box"):null},e.TOOLTIP_DURATION_NAME="post_donut_duration_btn",e.TOOLTIP_DURATION_OPTION_SELECTOR='[data-onclick="toggleDonutPostDuration"]',e.TOOLTIP_VISIBILITY_NAME="donut_visibility_btn",e.TOOLTIP_VISIBILITY_OPTION_SELECTOR='[data-onclick="toggleDonutPostVisibility"]',e}(),m=function(e){var t=e.actionsEl,a=e.addMedia;if(t instanceof Element){var i=new v(t,a);return{donutPostSettings:i.isInitialized?i:void 0}}}},452644:(e,t,a)=>{"use strict";a.d(t,{ATTACH_DATA_DONUT_DURATION:()=>i.ATTACH_DATA_DONUT_DURATION,MEDIA_TYPE_DONUT_DURATION:()=>i.MEDIA_TYPE_DONUT_DURATION,donutVisibilityInit:()=>o.donutVisibilityInit,getDonutPostParams:()=>n.getDonutPostParams,getPostParamsFromDurationMedia:()=>n.getPostParamsFromDurationMedia,fieldValueIsDonutOnlyPost:()=>n.fieldValueIsDonutOnlyPost,updatePostponedPostDonatorIcon:()=>n.updatePostponedPostDonatorIcon,isPaidAttachPicked:()=>n.isPaidAttachPicked});var i=a(712787),o=a(543570),n=a(389501)},325637:(e,t,a)=>{"use strict";a.d(t,{isDonutDurationFinite:()=>o,domInsertChildAfterOtherChild:()=>n,appendChildOrUpdate:()=>r});var i=a(315544),o=function(e){return e>0},n=function(e,t,a){a?(0,i.domInsertAfter)(e,a):t&&(t.firstChild?(0,i.domInsertBefore)(e,t.firstChild):e&&t.appendChild(e))},r=function(e,t,a){a?(0,i.domReplaceEl)(a,t):e.appendChild(t)}},353787:(e,t,a)=>{"use strict";a.d(t,{getActionData:()=>o});var i=a(830104),o=function(e){var t=(0,i.getJsonDataValue)(e,"data-action-params");if("object"==typeof t||null===t)return{actionParams:t}}},389501:(e,t,a)=>{"use strict";a.d(t,{getPostParamsFromDurationMedia:()=>c,fieldValueIsDonutOnlyPost:()=>p,getDonutPostParams:()=>u,updatePostponedPostDonatorIcon:()=>h,isPaidAttachPicked:()=>g});var i=a(653629),o=a(712787),n=a(325637),r=a(315544),s=a(695724),d=a(982452),l=a(490827),c=function(e){var t,a=(0,l.getDurationFromMediaItem)(e);return void 0!==a?((t={})[i.POST_PARAM_DONUT_DURATION]=a,t):void 0},_=function(e){var t=e.findChosenMedia(o.MEDIA_TYPE_DONUT_DURATION);return(0,l.getDurationFromMediaItem)(t)},p=function(e,t){return void 0!==(t&&_(t))&&(0,l.isDonutPostSettingVisible)(e,t)?1:0},u=function(e,t){var a;if(e&&t){var n=_(t)||o.DONUT_DURATION_DEFAULT;return(a={})[i.POST_PARAM_DONUT_DURATION]=n,a.mark_as_ads=0,a}},h=function(e,t){if(e instanceof Element){var a=!!(null==t?void 0:t[o.WALL_SAVE_RESPONSE_IS_MARKED_AS_DONUT]),i=e.querySelector('[data-section-ref="donut-post-donator-icon"]');if(a){var d=e.querySelector(".post_date"),l=(0,s.getTemplate)("postDonatorIcon");d&&l&&(0,n.appendChildOrUpdate)(d,(0,r.se)(l),i)}else null==i||i.remove()}},g=function(e,t){return e.getMedias().some((function(e){return function(e,t){var a;switch(e[0]){case"article":var i=null==e?void 0:e[5],o=(null==i?void 0:i.owner_id)===t;return Boolean(o&&(null==i?void 0:i.is_donut));case"podcast":var n=null===(a=null==e?void 0:e[5])||void 0===a?void 0:a.audio,r=null==n?void 0:n[12];return o=(null==n?void 0:n[1])===t,Boolean(o&&(0,d.parseJSON)(r).paid);default:return!1}}(e,t)}))}},490827:(e,t,a)=>{"use strict";a.d(t,{isDonutPostSettingVisible:()=>r,getDurationFromMediaItem:()=>s});var i=a(386409),o=a(315544),n=a(712787),r=function(e,t){var a=function(e){if(!(e instanceof Element)||"submit_post_box"!==e.id)return!0;var t=parseInt((0,o.domData)(e,"from-oid"))||void 0;return!!t&&t<0}(e),n=function(e){var t,a=null===(t=null==e?void 0:e.markAsAdsGetCheckboxEl)||void 0===t?void 0:t.call(e);return!a||!(0,i.isChecked)(a)}(t);return a&&n},s=function(e){var t,a=null===(t=null==e?void 0:e[5])||void 0===t?void 0:t[n.ATTACH_DATA_DONUT_DURATION];return void 0!==a?a:void 0}}}]);try{stManager.done("dist/dbc51599ae83613d5ae9303dc38e961c.edf2901e241840874d55.js")}catch(e){}